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

[XaraXtreme-commits] Commit Complete



Commit by  : phil
Repository : xara
Revision   : 1103
Date       : Wed May 17 13:13:58 BST 2006

Changed paths:
   M /Trunk/XaraLX/Kernel/menuops.cpp

Clear "invalid pathname" errors set when DocOps::GetState was searching for templates.
Fixes BZ1055


Diff:
Index: Trunk/XaraLX/Kernel/menuops.cpp
===================================================================
--- Trunk/XaraLX/Kernel/menuops.cpp	(revision 1102)
+++ Trunk/XaraLX/Kernel/menuops.cpp	(revision 1103)
@@ -588,6 +588,8 @@
 						//We failed to find a template. So remove this
 						//item from the menu.
 						FileUtil::StopFindingFiles();
+						// Don't allow any errors set while searching to propagate outside this scope
+						Error::ClearError();
 						return OpState(FALSE, FALSE, TRUE);
 					}
 
@@ -606,8 +608,14 @@
 
 			UIDescription->toTitle();
 
+			// Don't allow any errors set while searching to propagate outside this scope
+			Error::ClearError();
+
 			return OpState(FALSE, FALSE, FALSE);
 		}
+
+		// Don't allow any errors set while searching to propagate outside this scope
+		Error::ClearError();
 	}
 	
 	// File/SaveAll is only available if there is a document that is "dirty".
@@ -1201,7 +1209,7 @@
 	else if ((WhichOp->Token) == String(OPTOKEN_FILECLOSE))
 	{
 		// Close the file
-		FileCloseAction(); 
+		FileCloseAction();
 
 		// Always set the working doc to NULL, otherwise we try to indirect it in End().
 		// (This is safe even if the document doesn't close (e.g. modified) because we


Xara