summaryrefslogtreecommitdiffstats
path: root/Project/ElementDataObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Project/ElementDataObject.cpp')
-rw-r--r--Project/ElementDataObject.cpp28
1 files changed, 15 insertions, 13 deletions
diff --git a/Project/ElementDataObject.cpp b/Project/ElementDataObject.cpp
index ff2feed..a5ac165 100644
--- a/Project/ElementDataObject.cpp
+++ b/Project/ElementDataObject.cpp
@@ -1,25 +1,27 @@
#include "ElementDataObject.h"
-ElementDataObject::ElementDataObject() : wxDataObjectSimple(wxDataFormat("PSPCopy"))
+ElementDataObject::ElementDataObject()
+ : wxDataObjectSimple(wxDataFormat("PSPCopy"))
{
m_elementsLists = new ElementsLists();
}
-ElementDataObject::ElementDataObject(std::vector<Element*> elementList) : wxDataObjectSimple(wxDataFormat("PSPCopy"))
+ElementDataObject::ElementDataObject(std::vector<Element*> elementList)
+ : wxDataObjectSimple(wxDataFormat("PSPCopy"))
{
m_elementsLists = new ElementsLists();
if(elementList.size() > 0) {
- // Separate buses (parents) from the rest of the elements (childs).
- for(auto it = elementList.begin(), itEnd = elementList.end(); it != itEnd; ++it) {
- Element* copy = (*it)->GetCopy();
- if(copy) {
- if(typeid(*copy) == typeid(Bus))
- m_elementsLists->parentList.push_back((Bus*)copy);
- else
- m_elementsLists->elementList.push_back(copy);
- }
- }
- }
+ // Separate buses (parents) from the rest of the elements (childs).
+ for(auto it = elementList.begin(), itEnd = elementList.end(); it != itEnd; ++it) {
+ Element* copy = (*it)->GetCopy();
+ if(copy) {
+ if(typeid(*copy) == typeid(Bus))
+ m_elementsLists->parentList.push_back((Bus*)copy);
+ else
+ m_elementsLists->elementList.push_back(copy);
+ }
+ }
+ }
}
ElementDataObject::~ElementDataObject() {}