summaryrefslogtreecommitdiffstats
path: root/Project/Workspace.cpp
diff options
context:
space:
mode:
authorThales1330 <thaleslima.ufu@gmail.com>2016-08-30 17:30:54 -0300
committerThales1330 <thaleslima.ufu@gmail.com>2016-08-30 17:30:54 -0300
commitc478afa9fbef4b21ea85dbc266169b9eebf369a9 (patch)
treefde5344bf80f54324e9f3673e3c37eca4bb4ac3a /Project/Workspace.cpp
parent06e57f5c75772dcba902e3032c756f79090f3424 (diff)
downloadPSP.git-c478afa9fbef4b21ea85dbc266169b9eebf369a9.tar.gz
PSP.git-c478afa9fbef4b21ea85dbc266169b9eebf369a9.tar.xz
PSP.git-c478afa9fbef4b21ea85dbc266169b9eebf369a9.zip
Transformer
Diffstat (limited to 'Project/Workspace.cpp')
-rw-r--r--Project/Workspace.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/Project/Workspace.cpp b/Project/Workspace.cpp
index 10e58d3..cefbcfb 100644
--- a/Project/Workspace.cpp
+++ b/Project/Workspace.cpp
@@ -3,6 +3,7 @@
#include "Element.h"
#include "Bus.h"
#include "Line.h"
+#include "Transformer.h"
// Camera
Camera::Camera()
@@ -578,6 +579,17 @@ void Workspace::OnKeyDown(wxKeyEvent& event)
}
}
break;
+ case 'T': // Insert a transformer.
+ {
+ if(m_mode != MODE_INSERT) {
+ Transformer* newTransformer = new Transformer();
+ m_elementList.push_back(newTransformer);
+ m_mode = MODE_INSERT;
+ m_statusBar->SetStatusText(_("Insert Transformer: Click on two buses, ESC to cancel."));
+ Redraw();
+ }
+ }
+ break;
default:
break;
}
@@ -692,5 +704,3 @@ void Workspace::OnPopupClick(wxCommandEvent& event)
}
delete menu;
}
-
-void Workspace::DeleteElement(Element* element) {}