From 02c5a1d22a078c132aca40ea14b95800dd8257e9 Mon Sep 17 00:00:00 2001 From: Thales1330 Date: Thu, 27 Oct 2016 17:26:24 -0200 Subject: All elements forms implemented --- Project/MainFrame.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Project/MainFrame.cpp') diff --git a/Project/MainFrame.cpp b/Project/MainFrame.cpp index 1eadf70..bff01f7 100644 --- a/Project/MainFrame.cpp +++ b/Project/MainFrame.cpp @@ -267,13 +267,15 @@ void MainFrame::OnAddElementsClick(wxCommandEvent& event) newElement = true; } break; case ID_ADDMENU_INDMOTOR: { - IndMotor* newIndMotor = new IndMotor(); + IndMotor* newIndMotor = new IndMotor(wxString::Format(_("Induction motor %d"), workspace->GetElementNumber(ID_INDMOTOR))); + workspace->IncrementElementNumber(ID_INDMOTOR); elementList.push_back(newIndMotor); statusBarText = _("Insert Induction Motor: Click on a buses, ESC to cancel."); newElement = true; } break; case ID_ADDMENU_SYNCCOMP: { - SyncMotor* newSyncCondenser = new SyncMotor(); + SyncMotor* newSyncCondenser = new SyncMotor(wxString::Format(_("Synchronous condenser %d"), workspace->GetElementNumber(ID_SYNCMOTOR))); + workspace->IncrementElementNumber(ID_SYNCMOTOR); elementList.push_back(newSyncCondenser); statusBarText = _("Insert Synchronous Condenser: Click on a buses, ESC to cancel."); newElement = true; -- cgit