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

[XaraXtreme-commits] Commit Complete



Commit by  : alex
Repository : xara
Revision   : 1215
Date       : Tue May 30 16:16:12 BST 2006

Changed paths:
   M /Trunk/XaraLX/Kernel/coldlog.cpp
   M /Trunk/XaraLX/Kernel/coldlog.h

Fixed colour picker flicker


Diff:
Index: Trunk/XaraLX/Kernel/coldlog.h
===================================================================
--- Trunk/XaraLX/Kernel/coldlog.h	(revision 1214)
+++ Trunk/XaraLX/Kernel/coldlog.h	(revision 1215)
@@ -556,6 +556,9 @@
 	void HideOrShowColourPicker();
 	void CheckDialogSize();
 
+	BOOL m_NeedsResize;
+	void NeedsResize() {m_NeedsResize = TRUE;}
+
 private:
 	void LoseKeyboardFocus(void);
 		// Lobs the keyboard focus back into the document
Index: Trunk/XaraLX/Kernel/coldlog.cpp
===================================================================
--- Trunk/XaraLX/Kernel/coldlog.cpp	(revision 1214)
+++ Trunk/XaraLX/Kernel/coldlog.cpp	(revision 1215)
@@ -667,6 +667,7 @@
 	CurrentCursor	= NULL;
 
 	m_bDoingSetGadget = FALSE;
+	m_NeedsResize = FALSE;
 }
 
 
@@ -981,7 +982,7 @@
 		ColourPicker::SetWindowExtent(WindowID, _R(IDC_EDIT_PICKER), _R(IDC_EDIT_PICKER));
 		#endif // WEBSTER
 		HideGadget(_R(IDC_EDIT_ADVANCEDPANEL), TRUE);
-		CheckDialogSize();
+		NeedsResize();
 		return;
 	}
 
@@ -1001,6 +1002,8 @@
 	Folded = FALSE; // always unfolded
 #endif // WEBSTER
 
+	NeedsResize();
+
 	if (Folded)
 	{		
 		// WEBSTER - markn 11/12/96
@@ -1066,8 +1069,6 @@
 #endif
 	}
 
-	CheckDialogSize();
-
 }
 
 
@@ -1137,6 +1138,11 @@
 
 void ColourEditDlg::CheckDialogSize()
 {
+	if (!m_NeedsResize)
+		return;
+
+	m_NeedsResize=FALSE;
+
 	CWindowID pPanel=DialogManager::GetGadget(WindowID, _R(IDC_EDIT_ADVANCEDPANEL));
 	if (pPanel)
 	{
@@ -1228,6 +1234,7 @@
 
 	if (State.ColType != CurrentColType)
 	{
+		NeedsResize();
 		EnableGadget(_R(IDC_EDIT_TINT), Enable);
 
 		EnableGadget(_R(IDC_EDIT_TINTNAME), Enable);
@@ -1298,6 +1305,7 @@
 	// Set up the combo box of available colour models
 	if (State.DisplayModel != DisplayModel)
 	{
+		NeedsResize();
 		// Shift around the component name and writable gadgets until Windows doesn't
 		// know if it's coming or going. 
 		static CGadgetID CompGadgetIDs[10] =
@@ -1374,15 +1382,15 @@
 
 	if (DisplayModel == COLOURMODEL_RGBT || DisplayModel == COLOURMODEL_HSVT)
 	{
-		HideGadget (_R(IDC_NAME_COMPONENT4), TRUE);
-		HideGadget (_R(IDC_EDIT_COMPONENT4), TRUE);
+		//HideGadget (_R(IDC_NAME_COMPONENT4), TRUE);
+		//HideGadget (_R(IDC_EDIT_COMPONENT4), TRUE);
 		HideGadget (_R(IDC_NAME_WEBHEX), FALSE);
 		HideGadget (_R(IDC_EDIT_WEBHEX), FALSE);
 	}
 	else
 	{
-		HideGadget (_R(IDC_NAME_COMPONENT4), FALSE);
-		HideGadget (_R(IDC_EDIT_COMPONENT4), FALSE);
+		//HideGadget (_R(IDC_NAME_COMPONENT4), FALSE);
+		//HideGadget (_R(IDC_EDIT_COMPONENT4), FALSE);
 
 		HideGadget (_R(IDC_NAME_WEBHEX), TRUE);
 		HideGadget (_R(IDC_EDIT_WEBHEX), TRUE);
@@ -1583,7 +1591,7 @@
 			ColourContextList::GetList()->RemoveContext(&cc);			// Have finished with it
 
 	}
-	CheckDialogSize();
+	//CheckDialogSize();
 }
 
 
@@ -1657,7 +1665,7 @@
 			}
 		}
 	}
-	CheckDialogSize();
+	//CheckDialogSize();
 }
 
 


Xara