From 3d3475e965970cbf6d107aebd82a54d31b4617a7 Mon Sep 17 00:00:00 2001 From: Thomas Geymayer Date: Fri, 31 May 2013 19:30:48 +0200 Subject: [PATCH] Small cleanup. --- src/GUI/CanvasWidget.cxx | 7 +------ src/Scripting/NasalCanvas.cxx | 2 ++ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/GUI/CanvasWidget.cxx b/src/GUI/CanvasWidget.cxx index d627d6f2f..fc21d0c93 100644 --- a/src/GUI/CanvasWidget.cxx +++ b/src/GUI/CanvasWidget.cxx @@ -95,12 +95,7 @@ CanvasWidget::CanvasWidget( int x, int y, CanvasWidget::~CanvasWidget() { if( _canvas ) - // TODO check if really not in use anymore - _canvas->getProps() - ->getParent() - ->removeChild( _canvas->getProps()->getName(), - _canvas->getProps()->getIndex(), - false ); + _canvas->destroy(); } // Old versions of PUI are missing this defines... diff --git a/src/Scripting/NasalCanvas.cxx b/src/Scripting/NasalCanvas.cxx index 3a1c263ef..8f6671d28 100644 --- a/src/Scripting/NasalCanvas.cxx +++ b/src/Scripting/NasalCanvas.cxx @@ -181,6 +181,8 @@ naRef initNasalCanvas(naRef globals, naContext c, naRef gcSave) .member("screenY", &sc::MouseEvent::getScreenY) .member("clientX", &sc::MouseEvent::getClientX) .member("clientY", &sc::MouseEvent::getClientY) + .member("localX", &sc::MouseEvent::getLocalX) + .member("localY", &sc::MouseEvent::getLocalY) .member("deltaX", &sc::MouseEvent::getDeltaX) .member("deltaY", &sc::MouseEvent::getDeltaY) .member("click_count", &sc::MouseEvent::getCurrentClickCount);