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);