summaryrefslogtreecommitdiffstats
path: root/ToolAddRect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ToolAddRect.cpp')
-rw-r--r--ToolAddRect.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/ToolAddRect.cpp b/ToolAddRect.cpp
index 08367ff..39fad6d 100644
--- a/ToolAddRect.cpp
+++ b/ToolAddRect.cpp
@@ -50,18 +50,18 @@ void ToolAddRect::render(const Level &level, const Rectangle &rect, float scale)
drawPolygon(room.getPolygon());
}
-bool ToolAddRect::buttonPress(unsigned int button) {
+bool ToolAddRect::buttonPress(unsigned int button, const Vertex *v) {
if(button != 1)
return false;
- if(!editManager->getHoveredVertex())
+ if(!v)
return false;
- if(!editManager->vertexOk(*editManager->getHoveredVertex()))
+ if(!editManager->vertexOk(*v))
return false;
pressed = true;
- v1 = *editManager->getHoveredVertex();
+ v1 = *v;
editManager->redraw();
sidebar.update();
@@ -69,13 +69,13 @@ bool ToolAddRect::buttonPress(unsigned int button) {
return true;
}
-bool ToolAddRect::buttonRelease(unsigned int button) {
+bool ToolAddRect::buttonRelease(unsigned int button, const Vertex *v) {
if(button != 1 || !pressed)
return false;
pressed = false;
- if(editManager->getHoveredVertex()) {
+ if(v) {
Room room = createRoom();
if(editManager->polygonOk(room.getPolygon())) {