[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]
[XaraXtreme-commits] Commit Complete
Commit by : alex
Repository : xara
Revision : 837
Date : Tue Apr 18 20:54:40 BST 2006
Changed paths:
M /Trunk/XaraLX/Kernel/dialogop.cpp
Fix some message broadcasting issues which prevented clean exit from Camelot whilst a gallery was up.
There is still one remaining problem which requires a wxAUI patch which I am still mulling over.
Diff:
Index: Trunk/XaraLX/Kernel/dialogop.cpp
===================================================================
--- Trunk/XaraLX/Kernel/dialogop.cpp (revision 836)
+++ Trunk/XaraLX/Kernel/dialogop.cpp (revision 837)
@@ -2421,19 +2421,25 @@
break;
case DIM_CANCEL:
-// case DIM_CREATE:
+ case DIM_CREATE:
case DIM_BAR_DEATH:
- // These messages need to be broadcast to all controls within the dialog
- if (ControlList::Get()->SendMessageToAllControls(this, pDlgMsg))
{
- Close();
- End();
- // the Op has now been deleted. Exit fast!
- return OK;
- //DlgMgr->Delete(WindowID, this);
- //WindowID = NULL;
+ // These messages need to be propagated to all controls
+ BOOL Destroy = ControlList::Get()->SendMessageToAllControls(this, pDlgMsg);
+
+ // These messages need to be broadcast to all controls within the dialog
+ // temporarily ALWAYS destroy if we get as far as here on a DIM_CANCEL
+ if ((pDlgMsg->DlgMsg==DIM_CANCEL) || Destroy )
+ {
+ Close();
+ End();
+ // the Op has now been deleted. Exit fast!
+ return OK;
+ //DlgMgr->Delete(WindowID, this);
+ //WindowID = NULL;
+ }
+ break;
}
- break;
default:
break;
Xara