summaryrefslogtreecommitdiffstats
path: root/Project/ControlEditor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Project/ControlEditor.cpp')
-rw-r--r--Project/ControlEditor.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/Project/ControlEditor.cpp b/Project/ControlEditor.cpp
index cb0edf3..5d64c5c 100644
--- a/Project/ControlEditor.cpp
+++ b/Project/ControlEditor.cpp
@@ -717,6 +717,7 @@ void ControlEditor::OnExportClick(wxCommandEvent& event)
fileHandling.SaveControl(saveFileDialog.GetPath());
wxFileName fileName(saveFileDialog.GetPath());
+ event.Skip();
}
void ControlEditor::OnImportClick(wxCommandEvent& event)
@@ -728,9 +729,20 @@ void ControlEditor::OnImportClick(wxCommandEvent& event)
wxFileName fileName(openFileDialog.GetPath());
FileHanding fileHandling(this);
- if(!fileHandling.OpenControl(fileName)) {
+ if(!fileHandling.OpenControl(fileName, m_elementList, m_connectionList)) {
wxMessageDialog msgDialog(this, _("It was not possible to open the selected file."), _("Error"),
wxOK | wxCENTRE | wxICON_ERROR);
msgDialog.ShowModal();
}
-} \ No newline at end of file
+ Redraw();
+ event.Skip();
+}
+
+/*void ControlEditor::SetElementsList(std::vector<ControlElement*> elementList)
+{
+ m_elementList.clear();
+ for(auto it = elementList.begin(), itEnd = elementList.end(); it != itEnd; ++it) {
+ ControlElement* element = *it;
+ m_elementList.push_back(element);
+ }
+}*/