View Issue Details

IDProjectCategoryView StatusLast Update
0025439PackagesTAChartpublic2014-01-18 00:30
Reporterwp Assigned ToMaxim Ganetsky  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.3 (SVN) 
Fixed in Version1.2.0 
Summary0025439: TAChart: Built-in zoom tool eating MouseMove event
DescriptionEven if built-in zooming and panning support of TAChart is turned off (AllowZoom = false) the OnMouseMove event of TChart does not fire when the left mouse button is pressed.

Please see these discussions in the forum:
http://forum.lazarus.freepascal.org/index.php/topic,22957.0.html
http://forum.lazarus.freepascal.org/index.php/topic,22946.0.html

As the OP in these discussions notes, a workaround can be achieved by linking the chart to a ChartToolset. But, of course, this is not a permanent solution.
Steps To ReproduceIn the attached demo, the OnMouseMove event of the chart causes a message box to pop up if the left mouse button is pressed while dragging the mouse across the chart. This does not happen, i.e. the OnMouseMove event is not fired.

After application of the attached patch, the message does appear.

In the patched TATools unit, the MouseMove method of TZoomDragTool is left immediately if the the tool is not active. The built-in tool is not activated if the property AllowZoom of the chart is set to false. Therefore, the built-in zoom tool no longer catches the OnMouseMove event.
TagsNo tags attached.
Fixed in Revision43738
LazTarget-
Widgetset
Attached Files

Activities

wp

2013-12-18 14:07

developer  

tatools.pas.patch (372 bytes)   
Index: tatools.pas
===================================================================
--- tatools.pas	(revision 43563)
+++ tatools.pas	(working copy)
@@ -1178,6 +1178,7 @@
 
 procedure TZoomDragTool.MouseMove(APoint: TPoint);
 begin
+  if not IsActive then exit;
   SelectionRect := Rect(SelectionRect.Left, SelectionRect.Top, APoint.X, APoint.Y);
   Handled;
 end;
tatools.pas.patch (372 bytes)   

wp

2013-12-18 14:08

developer  

wp

2014-01-05 17:26

developer   ~0072227

Could somebody appy this patch? I'd like to have it fixed in 1.2

Maxim Ganetsky

2014-01-16 21:57

developer   ~0072496

Applied, thanks.

Scheduled for merging to fixes_1_2.

Please test and close if OK.

wp

2014-01-16 23:41

developer   ~0072500

Thanks.

Issue History

Date Modified Username Field Change
2013-12-18 14:06 wp New Issue
2013-12-18 14:06 wp Status new => assigned
2013-12-18 14:06 wp Assigned To => Alexander S. Klenin
2013-12-18 14:07 wp File Added: tatools.pas.patch
2013-12-18 14:08 wp File Added: Chart_MouseMove_Event_Failure.zip
2014-01-05 17:26 wp Note Added: 0072227
2014-01-16 21:57 Maxim Ganetsky Fixed in Revision => 43738
2014-01-16 21:57 Maxim Ganetsky LazTarget => -
2014-01-16 21:57 Maxim Ganetsky Note Added: 0072496
2014-01-16 21:57 Maxim Ganetsky Status assigned => resolved
2014-01-16 21:57 Maxim Ganetsky Fixed in Version => 1.4
2014-01-16 21:57 Maxim Ganetsky Resolution open => fixed
2014-01-16 21:57 Maxim Ganetsky Assigned To Alexander S. Klenin => Maxim Ganetsky
2014-01-16 22:43 Maxim Ganetsky Fixed in Version 1.4 => 1.2.0
2014-01-16 23:41 wp Note Added: 0072500
2014-01-18 00:30 Maxim Ganetsky Status resolved => closed