[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

[XaraXtreme-commits] Commit Complete



Commit by  : luke
Repository : xara
Revision   : 1768
Date       : Fri Jun 15 11:04:13 BST 2007

Changed paths:
   M /Trunk/XaraLX/tools/freeinfo.cpp

This one line change fixes the crash when selecting a stroke shape from
the line gallery. It turns out that the FreeHandInfoBar was catching the
message that a stroke shape was selected, and attempting to change the
value in the dropdown list. This was happening even if the freehand tool
wasn't selected, and hence the info bar wasn't displayed.

There are two places in the FreeHandInfoBarOp::Message function where
SetStrokeComboFromSelection() is called. The one is executed
conditionally if ControlsExist and IsVisible(), but the other one was
not, so this was an easy fix.


Diff:
Index: Trunk/XaraLX/tools/freeinfo.cpp
===================================================================
--- Trunk/XaraLX/tools/freeinfo.cpp	(revision 1767)
+++ Trunk/XaraLX/tools/freeinfo.cpp	(revision 1768)
@@ -474,7 +474,7 @@
 		}
 
 		// if it is a stroke message then update our combo
-		if (Message->IsKindOf(CC_RUNTIME_CLASS(StrokeMsg)))
+		if (Message->IsKindOf(CC_RUNTIME_CLASS(StrokeMsg)) && ControlsExist && IsVisible())
 			SetStrokeComboFromSelection();
 
 		// likewise if it is a screen change message
@@ -2765,3 +2765,4 @@
 
 }
 
+


Xara