diff options
author | Thales Lima Oliveira <thaleslima.ufu@gmail.com> | 2017-04-24 17:39:03 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-24 17:39:03 -0300 |
commit | 7804c1bd2c0bd2a5f135c30b20991e8187581cc6 (patch) | |
tree | 725e524253d6fd714460402194b408cb33b80b3f /Project/MainFrame.cpp | |
parent | 69131a727782090ffd7cb467f449e8f26d3d2949 (diff) | |
parent | 9529a6ed44645842adc6f938478acc1dfa17a284 (diff) | |
download | PSP.git-7804c1bd2c0bd2a5f135c30b20991e8187581cc6.tar.gz PSP.git-7804c1bd2c0bd2a5f135c30b20991e8187581cc6.tar.xz PSP.git-7804c1bd2c0bd2a5f135c30b20991e8187581cc6.zip |
Merge pull request #28 from Thales1330/wip/generic-controllers
Wip generic controllers. Chart view implementation required, creating new branch....
Diffstat (limited to 'Project/MainFrame.cpp')
-rw-r--r-- | Project/MainFrame.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Project/MainFrame.cpp b/Project/MainFrame.cpp index bb180a3..87c547e 100644 --- a/Project/MainFrame.cpp +++ b/Project/MainFrame.cpp @@ -111,8 +111,7 @@ void MainFrame::CreateAddElementsMenu() m_addElementsMenu->Append(capacitorElement); m_addElementsMenu->Append(inductorElement); - m_addElementsMenu->Connect( - wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnAddElementsClick), NULL, this); + m_addElementsMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrame::OnAddElementsClick, this); } void MainFrame::OnNewClick(wxRibbonButtonBarEvent& event) @@ -198,7 +197,7 @@ void MainFrame::OnMoveClick(wxRibbonButtonBarEvent& event) element->StartMove(averagePos); } } - workspace->SetWorkspaceMode(MODE_MOVE_ELEMENT); + workspace->SetWorkspaceMode(Workspace::MODE_MOVE_ELEMENT); } } @@ -304,7 +303,7 @@ void MainFrame::OnAddElementsClick(wxCommandEvent& event) Workspace* workspace = static_cast<Workspace*>(m_auiNotebook->GetCurrentPage()); if(workspace) { - if(workspace->GetWorkspaceMode() != MODE_INSERT) { + if(workspace->GetWorkspaceMode() != Workspace::MODE_INSERT) { auto elementList = workspace->GetElementList(); wxString statusBarText = ""; bool newElement = false; @@ -383,7 +382,7 @@ void MainFrame::OnAddElementsClick(wxCommandEvent& event) } if(newElement) { workspace->SetElementList(elementList); - workspace->SetWorkspaceMode(MODE_INSERT); + workspace->SetWorkspaceMode(Workspace::MODE_INSERT); workspace->SetStatusBarText(statusBarText); workspace->Redraw(); } |