summaryrefslogtreecommitdiffstats
path: root/Project/WorkspaceBase.cpp
diff options
context:
space:
mode:
authorThales Lima Oliveira <thaleslima.ufu@gmail.com>2017-01-05 19:37:42 -0200
committerGitHub <noreply@github.com>2017-01-05 19:37:42 -0200
commit9df133274802731220546d1f9383c213193c8413 (patch)
tree9c6e2fa2a45d6c6c4c14d8711b2b89066bfb37d7 /Project/WorkspaceBase.cpp
parentc5343c718cf80620c2fc7452a4315f7ddb9e5826 (diff)
parentb6f96ca48bc156898df79deba63d270b393fb150 (diff)
downloadPSP.git-9df133274802731220546d1f9383c213193c8413.tar.gz
PSP.git-9df133274802731220546d1f9383c213193c8413.tar.xz
PSP.git-9df133274802731220546d1f9383c213193c8413.zip
Merge pull request #5 from Thales1330/opt/element-parent-search
Opt element parent search
Diffstat (limited to 'Project/WorkspaceBase.cpp')
-rw-r--r--Project/WorkspaceBase.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/Project/WorkspaceBase.cpp b/Project/WorkspaceBase.cpp
index f4973d6..a4a6d64 100644
--- a/Project/WorkspaceBase.cpp
+++ b/Project/WorkspaceBase.cpp
@@ -37,6 +37,9 @@ WorkspaceBase::WorkspaceBase(wxWindow* parent, wxWindowID id, const wxPoint& pos
boxSizer_lvl_1_1->Add(m_glCanvas, 1, wxEXPAND, WXC_FROM_DIP(5));
+ m_timer = new wxTimer;
+ m_timer->Start(1500, false);
+
SetName(wxT("WorkspaceBase"));
SetSize(500,300);
if (GetSizer()) {
@@ -53,6 +56,8 @@ WorkspaceBase::WorkspaceBase(wxWindow* parent, wxWindowID id, const wxPoint& pos
m_glCanvas->Connect(wxEVT_MOUSEWHEEL, wxMouseEventHandler(WorkspaceBase::OnScroll), NULL, this);
m_glCanvas->Connect(wxEVT_RIGHT_DOWN, wxMouseEventHandler(WorkspaceBase::OnRightClickDown), NULL, this);
m_glCanvas->Connect(wxEVT_LEFT_DCLICK, wxMouseEventHandler(WorkspaceBase::OnLeftDoubleClick), NULL, this);
+ m_glCanvas->Connect(wxEVT_IDLE, wxIdleEventHandler(WorkspaceBase::OnIdle), NULL, this);
+ m_timer->Connect(wxEVT_TIMER, wxTimerEventHandler(WorkspaceBase::OnTimer), NULL, this);
}
@@ -68,5 +73,10 @@ WorkspaceBase::~WorkspaceBase()
m_glCanvas->Disconnect(wxEVT_MOUSEWHEEL, wxMouseEventHandler(WorkspaceBase::OnScroll), NULL, this);
m_glCanvas->Disconnect(wxEVT_RIGHT_DOWN, wxMouseEventHandler(WorkspaceBase::OnRightClickDown), NULL, this);
m_glCanvas->Disconnect(wxEVT_LEFT_DCLICK, wxMouseEventHandler(WorkspaceBase::OnLeftDoubleClick), NULL, this);
+ m_glCanvas->Disconnect(wxEVT_IDLE, wxIdleEventHandler(WorkspaceBase::OnIdle), NULL, this);
+ m_timer->Disconnect(wxEVT_TIMER, wxTimerEventHandler(WorkspaceBase::OnTimer), NULL, this);
+ m_timer->Stop();
+ wxDELETE( m_timer );
+
}