summaryrefslogtreecommitdiffstats
path: root/Project/MainFrame.cpp
diff options
context:
space:
mode:
authorThales Lima Oliveira <thaleslima.ufu@gmail.com>2017-08-09 21:01:41 -0300
committerThales Lima Oliveira <thaleslima.ufu@gmail.com>2017-08-09 21:01:41 -0300
commit8a1ffbc01135a1466ad7400518e4c56a4bdc3af5 (patch)
treed27db60347d5cb69781b3667d436601ae17b018e /Project/MainFrame.cpp
parentd7550fe1c173f1be296f1ce7991ad6d70ed90ceb (diff)
downloadPSP.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.cpp16
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();
+ }
}