summaryrefslogtreecommitdiffstats
path: root/Project/MainFrame.cpp
diff options
context:
space:
mode:
authorThales1330 <thaleslima.ufu@gmail.com>2016-09-12 18:49:00 -0300
committerThales1330 <thaleslima.ufu@gmail.com>2016-09-12 18:49:00 -0300
commit1088617b8f1c31af3ad6a87f9934f7a55240b3a2 (patch)
tree922d0e070c7ef3351dc166340b77485dd5b814f3 /Project/MainFrame.cpp
parentd5c3a7c9c375f683f5b66a19caf28299af89ef65 (diff)
downloadPSP.git-1088617b8f1c31af3ad6a87f9934f7a55240b3a2.tar.gz
PSP.git-1088617b8f1c31af3ad6a87f9934f7a55240b3a2.tar.xz
PSP.git-1088617b8f1c31af3ad6a87f9934f7a55240b3a2.zip
Bus form under implementation [2]
Diffstat (limited to 'Project/MainFrame.cpp')
-rw-r--r--Project/MainFrame.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/Project/MainFrame.cpp b/Project/MainFrame.cpp
index b02869f..cfb24cf 100644
--- a/Project/MainFrame.cpp
+++ b/Project/MainFrame.cpp
@@ -136,9 +136,9 @@ void MainFrame::OnCopyClick(wxRibbonButtonBarEvent& event) {}
void MainFrame::OnDataReportClick(wxRibbonButtonBarEvent& event) {}
void MainFrame::OnDeleteClick(wxRibbonButtonBarEvent& event)
{
- Workspace* workspace = (Workspace*)m_auiNotebook->GetCurrentPage();
+ Workspace* workspace = (Workspace*)m_auiNotebook->GetCurrentPage();
if(workspace) {
- workspace->DeleteSelectedElements();
+ workspace->DeleteSelectedElements();
}
}
void MainFrame::OnDisableSolutionClick(wxRibbonButtonBarEvent& event)
@@ -158,9 +158,9 @@ void MainFrame::OnExpImpClick(wxRibbonButtonBarEvent& event) {}
void MainFrame::OnFaultClick(wxRibbonButtonBarEvent& event) {}
void MainFrame::OnFitClick(wxRibbonButtonBarEvent& event)
{
- Workspace* workspace = (Workspace*)m_auiNotebook->GetCurrentPage();
+ Workspace* workspace = (Workspace*)m_auiNotebook->GetCurrentPage();
if(workspace) {
- workspace->Fit();
+ workspace->Fit();
}
}
void MainFrame::OnMoveClick(wxRibbonButtonBarEvent& event)
@@ -218,7 +218,10 @@ void MainFrame::OnAddElementsClick(wxCommandEvent& event)
{
case ID_ADDMENU_BUS:
{
- Bus* newBus = new Bus(wxPoint2DDouble(0, 0));
+ Bus* newBus =
+ new Bus(wxPoint2DDouble(0, 0),
+ wxString::Format(_("Bus %d"), workspace->GetElementNumber(ID_BUS)));
+ workspace->IncrementElementNumber(ID_BUS);
elementList.push_back(newBus);
statusBarText = _("Insert Bus: Click to insert, ESC to cancel.");
newElement = true;