From 77b187b8eba7598fb6154da5d3d62ad0920eac15 Mon Sep 17 00:00:00 2001 From: neoraider Date: Fri, 15 Feb 2008 22:44:03 +0000 Subject: zoomedit: Changed some interfaces. --- ToolGrab.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'ToolGrab.cpp') 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; -- cgit v1.2.3