From 41d285a821b6d28739ef0c86e25068dc2964cde8 Mon Sep 17 00:00:00 2001 From: Thomas Geymayer Date: Sun, 16 Dec 2012 19:02:43 +0100 Subject: [PATCH] Canvas: remove old event handling code --- src/GUI/CanvasWidget.cxx | 13 ------------- src/GUI/CanvasWidget.hxx | 4 ---- 2 files changed, 17 deletions(-) diff --git a/src/GUI/CanvasWidget.cxx b/src/GUI/CanvasWidget.cxx index 72b7ec177..b2aeb59c4 100644 --- a/src/GUI/CanvasWidget.cxx +++ b/src/GUI/CanvasWidget.cxx @@ -56,11 +56,6 @@ CanvasWidget::CanvasWidget( int x, int y, cprops->setBoolValue("render-always", true); cprops->setStringValue( "name", props->getStringValue("name", "gui-anonymous") ); - SGPropertyNode* input = cprops->getChild("input", 0, true); - _mouse_x = input->getChild("mouse-x", 0, true); - _mouse_y = input->getChild("mouse-y", 0, true); - _mouse_down = input->getChild("mouse-down", 0, true); - _mouse_drag = input->getChild("mouse-drag", 0, true); SGPropertyNode *nasal = props->getNode("nasal"); if( !nasal ) @@ -177,14 +172,6 @@ void CanvasWidget::doHit(int button, int updown, int x, int y) } _canvas->handleMouseEvent(event); - - _mouse_x->setIntValue(x - abox.min[0]); - _mouse_y->setIntValue(abox.max[1] - y); - - if( updown == PU_DRAG ) - _mouse_drag->setIntValue(button); - else if( updown == PU_DOWN ) - _mouse_down->setIntValue(button); } //------------------------------------------------------------------------------ diff --git a/src/GUI/CanvasWidget.hxx b/src/GUI/CanvasWidget.hxx index a2e6c84b1..a91193814 100644 --- a/src/GUI/CanvasWidget.hxx +++ b/src/GUI/CanvasWidget.hxx @@ -37,10 +37,6 @@ class CanvasWidget: // location or make it static... simgear::canvas::CanvasPtr _canvas; - SGPropertyNode *_mouse_x, - *_mouse_y, - *_mouse_down, - *_mouse_drag; float _last_x, _last_y;