summaryrefslogtreecommitdiffstats
path: root/EditManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'EditManager.cpp')
-rw-r--r--EditManager.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/EditManager.cpp b/EditManager.cpp
index 0052c8f..9ca3dfb 100644
--- a/EditManager.cpp
+++ b/EditManager.cpp
@@ -46,7 +46,7 @@ bool EditManager::addRoom(const Room &newRoom) {
Room *room = new Room(newRoom);
room->setName(idManager.generate("room"));
- window->getLevel().push_back(SharedPtr<LevelObject>(room));
+ window->getLevel().addWithChildren(SharedPtr<LevelObject>(room));
selectedObject = room;
window->resetTool();
@@ -62,7 +62,7 @@ const Vertex* EditManager::getHoveredVertex() const {
else return NULL;
}
-void EditManager::setHoveredVertex(const Vertex *v) {
+void EditManager::setHoveredVertex(const Vertex *v, float scale) {
if(v) {
hasHoveredVertex = true;
hoveredVertex = *v;
@@ -70,7 +70,7 @@ void EditManager::setHoveredVertex(const Vertex *v) {
hoveredObject = NULL;
for(Level::iterator object = window->getLevel().begin(); object != window->getLevel().end(); object++) {
- if((*object)->hit(*v)) {
+ if((*object)->hit(*v, scale)) {
if(hoveredObject && (*object)->getPriority() < hoveredObject->getPriority())
continue;