diff libgui/graphics/Canvas.h @ 20629:46edfbd31ad7

Fix execution of "windowbuttonmotionfcn" with uipanels (bug #46151) * Canvas.cc (Canvas::canvasMouseMoveEvent): decide here to update the currentpoint and run "windowbuttonmotionfcn" if the latter is not empty * Canvas.h: remove unused "enableCurrentPointUpdates" method and "m_updateCurrentPoint" attribute * Figure.h: declare a new private method "enableMouseTracking" * Figure.cc (Figure::Figure): use "enableMouseTracking" instead of "update" on "windowbuttonmotionfcn". * Figure.cc (Figure::update): mouse tracking is now enabled unconditionally so remove unused case "windowbuttonmotionfcn". *Figure.cc(Figure::eventNotifyAfter): enable mouse tracking on new children widgets.
author Pantxo Diribarne <pantxo.diribarne@gmail.com>
date Sat, 10 Oct 2015 12:21:37 +0200
parents dcfbf4c1c3c8
children
line wrap: on
line diff
--- a/libgui/graphics/Canvas.h	Fri Oct 09 16:25:27 2015 +0200
+++ b/libgui/graphics/Canvas.h	Sat Oct 10 12:21:37 2015 +0200
@@ -70,7 +70,6 @@
   virtual void toggleAxes (const graphics_handle& handle) = 0;
   virtual void toggleGrid (const graphics_handle& handle) = 0;
   virtual void autoAxes (const graphics_handle& handle) = 0;
-  void enableCurrentPointUpdates (bool on) { m_updateCurrentPoint = on; }
 
 protected:
   virtual void draw (const graphics_handle& handle) = 0;
@@ -86,8 +85,7 @@
       m_mouseMode (NoMode),
       m_clickMode (false),
       m_eventMask (0),
-      m_rectMode (false),
-      m_updateCurrentPoint (false)
+      m_rectMode (false)
     { }
 
   void canvasToggleAxes (const graphics_handle& handle);
@@ -122,7 +120,6 @@
   graphics_handle m_mouseAxes;
   int m_eventMask;
   bool m_rectMode;
-  bool m_updateCurrentPoint;
 };
 
 }; // namespace QtHandles