diff options
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(); + } } |