diff options
author | Thales Lima Oliveira <thaleslima.ufu@gmail.com> | 2017-04-20 18:41:00 -0300 |
---|---|---|
committer | Thales Lima Oliveira <thaleslima.ufu@gmail.com> | 2017-04-20 18:41:00 -0300 |
commit | 341b4a77d2b4c69a99370065af166d92071c9207 (patch) | |
tree | 1d575b5a7fc953108f123b3b1b001d9acf25fc12 /Project/ControlEditor.cpp | |
parent | 3f7d8736dcbe13e21562bd324c1bc0deb0ceaf6b (diff) | |
download | PSP.git-341b4a77d2b4c69a99370065af166d92071c9207.tar.gz PSP.git-341b4a77d2b4c69a99370065af166d92071c9207.tar.xz PSP.git-341b4a77d2b4c69a99370065af166d92071c9207.zip |
Export/Import implemented
Diffstat (limited to 'Project/ControlEditor.cpp')
-rw-r--r-- | Project/ControlEditor.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Project/ControlEditor.cpp b/Project/ControlEditor.cpp index 5d64c5c..e457d0f 100644 --- a/Project/ControlEditor.cpp +++ b/Project/ControlEditor.cpp @@ -734,6 +734,21 @@ void ControlEditor::OnImportClick(wxCommandEvent& event) wxOK | wxCENTRE | wxICON_ERROR); msgDialog.ShowModal(); } + + //Get the highest id number + int majorElementID = 0; + for(auto it = m_elementList.begin(), itEnd = m_elementList.end(); it != itEnd; ++it) { + ControlElement* element = *it; + if(element->GetID() > majorElementID) + majorElementID = element->GetID(); + } + for(auto it = m_connectionList.begin(), itEnd = m_connectionList.end(); it != itEnd; ++it) { + ConnectionLine* line = *it; + if(line->GetID() > majorElementID) + majorElementID = line->GetID(); + } + m_lastElementID = ++majorElementID; + Redraw(); event.Skip(); } |