summaryrefslogtreecommitdiffstats
path: root/ToolGrab.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ToolGrab.cpp')
-rw-r--r--ToolGrab.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/ToolGrab.cpp b/ToolGrab.cpp
index 54543fd..b212308 100644
--- a/ToolGrab.cpp
+++ b/ToolGrab.cpp
@@ -19,12 +19,12 @@ void ToolGrab::activate() {
editManager->setSelectedObject(NULL);
}
-bool ToolGrab::buttonPress(unsigned int button) {
+bool ToolGrab::buttonPress(unsigned int button, const Vertex *v) {
if(button != 1 || !editManager->getHoveredObject())
return false;
pressed = true;
- grabbedVertex = *editManager->getHoveredVertex();
+ grabbedVertex = *v;
editManager->setSelectedObject(editManager->getHoveredObject());
@@ -34,7 +34,7 @@ bool ToolGrab::buttonPress(unsigned int button) {
return true;
}
-bool ToolGrab::buttonRelease(unsigned int button) {
+bool ToolGrab::buttonRelease(unsigned int button, const Vertex *v) {
if(button != 1)
return false;
@@ -48,14 +48,12 @@ bool ToolGrab::buttonRelease(unsigned int button) {
return true;
}
-bool ToolGrab::motion() {
+bool ToolGrab::motion(const Vertex *v) {
if(!pressed) {
editManager->highlightHoveredObject();
return true;
}
- const Vertex *v = editManager->getHoveredVertex();
-
if(!v)
return false;