summaryrefslogtreecommitdiffstats
path: root/Project/Element.cpp
diff options
context:
space:
mode:
authorThales1330 <thaleslima.ufu@gmail.com>2017-01-03 19:03:12 -0200
committerThales1330 <thaleslima.ufu@gmail.com>2017-01-03 19:03:12 -0200
commita1932eec23589ed67d824873b37de3e83a09cd24 (patch)
treedb2bed8e7a9c87ad6115a1b8a6a347cad6753b06 /Project/Element.cpp
parent2c0b51586b3b2243ae0fdcd653139818e4b4e23e (diff)
downloadPSP.git-a1932eec23589ed67d824873b37de3e83a09cd24.tar.gz
PSP.git-a1932eec23589ed67d824873b37de3e83a09cd24.tar.xz
PSP.git-a1932eec23589ed67d824873b37de3e83a09cd24.zip
Text element optimizated, but buggy
Element/parent search buggy
Diffstat (limited to 'Project/Element.cpp')
-rw-r--r--Project/Element.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/Project/Element.cpp b/Project/Element.cpp
index 85280d6..f0812d1 100644
--- a/Project/Element.cpp
+++ b/Project/Element.cpp
@@ -300,15 +300,15 @@ void Element::SetOnline(bool online)
void Element::GeneralMenuItens(wxMenu& menu)
{
wxMenuItem* clockItem = new wxMenuItem(&menu, ID_ROTATE_CLOCK, _("Rotate clockwise"));
- clockItem->SetBitmap(wxImage("data\\images\\menu\\rotateClock16.png"));
+ clockItem->SetBitmap(wxImage("..\\data\\images\\menu\\rotateClock16.png"));
menu.Append(clockItem);
wxMenuItem* counterClockItem = new wxMenuItem(&menu, ID_ROTATE_COUNTERCLOCK, _("Rotate counter-clockwise"));
- counterClockItem->SetBitmap(wxImage("data\\images\\menu\\rotateCounterClock16.png"));
+ counterClockItem->SetBitmap(wxImage("..\\data\\images\\menu\\rotateCounterClock16.png"));
menu.Append(counterClockItem);
wxMenuItem* deleteItem = new wxMenuItem(&menu, ID_DELETE, _("Delete"));
- deleteItem->SetBitmap(wxImage("data\\images\\menu\\delete16.png"));
+ deleteItem->SetBitmap(wxImage("..\\data\\images\\menu\\delete16.png"));
menu.Append(deleteItem);
}
@@ -462,7 +462,10 @@ void Element::RemoveChild(Element* child)
{
for(auto it = m_childList.begin(); it != m_childList.end(); ++it) {
Element* element = *it;
- if(element == child) m_childList.erase(it--);
+ if(element == child){
+ m_childList.erase(it);
+ break;
+ }
}
}