[aquaria] [PATCH] Fix background elements becoming unselectable after moving them between layers.
Andrew Church
achurch+aquaria at achurch.org
Wed Aug 17 20:58:27 EDT 2011
For the record, the bugs fixed by this patch and the previous one were
introduced by my changes and weren't present in the original 1.1.3 code,
so don't blame Alec for them -- they're 100% my fault. (:
--Andrew Church
achurch at achurch.org
http://achurch.org/
# HG changeset patch
# User Andrew Church <achurch at achurch.org>
# Date 1313582153 -32400
# Node ID 88bd4f013e2e756e1b57891570f6c7980ea5025c
# Parent 9c350f140a62de19546039b36d88fd8e0e7d3442
Fix background elements becoming unselectable after moving them between layers.
This patch fixes a bug in the scene editor which resulted in an element
moved between background layers (using Shift + the layer key) becoming
unselectable until the map was reloaded.
diff -r 9c350f140a62 -r 88bd4f013e2e Aquaria/SceneEditor.cpp
--- a/Aquaria/SceneEditor.cpp Wed Aug 17 20:48:37 2011 +0900
+++ b/Aquaria/SceneEditor.cpp Wed Aug 17 20:55:53 2011 +0900
@@ -2419,15 +2419,19 @@
{
Element *e = selectedElements[i];
core->removeRenderObject(e, Core::DO_NOT_DESTROY_RENDER_OBJECT);
+ dsq->removeElement(e);
+ e->bgLayer = bgLayer;
+ dsq->addElement(e);
core->addRenderObject(e, LR_ELEMENTS1+bgLayer);
- e->bgLayer = bgLayer;
}
}
else if (e)
{
core->removeRenderObject(e, Core::DO_NOT_DESTROY_RENDER_OBJECT);
+ dsq->removeElement(e);
+ e->bgLayer = bgLayer;
+ dsq->addElement(e);
core->addRenderObject(e, LR_ELEMENTS1+bgLayer);
- e->bgLayer = bgLayer;
}
}
More information about the aquaria
mailing list