diff options
author | Thales Lima Oliveira <thaleslima.ufu@gmail.com> | 2017-08-09 21:01:41 -0300 |
---|---|---|
committer | Thales Lima Oliveira <thaleslima.ufu@gmail.com> | 2017-08-09 21:01:41 -0300 |
commit | 8a1ffbc01135a1466ad7400518e4c56a4bdc3af5 (patch) | |
tree | d27db60347d5cb69781b3667d436601ae17b018e /Project/MainFrame.cpp | |
parent | d7550fe1c173f1be296f1ce7991ad6d70ed90ceb (diff) | |
download | PSP.git-8a1ffbc01135a1466ad7400518e4c56a4bdc3af5.tar.gz PSP.git-8a1ffbc01135a1466ad7400518e4c56a4bdc3af5.tar.xz PSP.git-8a1ffbc01135a1466ad7400518e4c56a4bdc3af5.zip |
Stability properties implemented
Diffstat (limited to 'Project/MainFrame.cpp')
-rw-r--r-- | Project/MainFrame.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/Project/MainFrame.cpp b/Project/MainFrame.cpp index bc1b584..90447ab 100644 --- a/Project/MainFrame.cpp +++ b/Project/MainFrame.cpp @@ -423,12 +423,20 @@ void MainFrame::OnRotCounterClockClick(wxRibbonButtonBarEvent& event) } void MainFrame::OnGeneralSettingsClick(wxRibbonButtonBarEvent& event) { - GeneralPropertiesForm genPropForm(this); - genPropForm.ShowModal(); + Workspace* workspace = static_cast<Workspace*>(m_auiNotebook->GetCurrentPage()); + if(workspace) { + GeneralPropertiesForm genPropForm(this, workspace->GetProperties()); + genPropForm.SetInitialSize(); + genPropForm.ShowModal(); + } } void MainFrame::OnSimulationSettingsClick(wxRibbonButtonBarEvent& event) { - SimulationsSettingsForm simulSettingsForm(this); - simulSettingsForm.ShowModal(); + Workspace* workspace = static_cast<Workspace*>(m_auiNotebook->GetCurrentPage()); + if(workspace) { + SimulationsSettingsForm simulSettingsForm(this, workspace->GetProperties()); + simulSettingsForm.SetInitialSize(); + simulSettingsForm.ShowModal(); + } } |