[commit] r2080 - trunk/GME/Gme

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Thu Oct 4 10:12:19 CDT 2012


Author: ksmyth
Date: Thu Oct  4 10:12:19 2012
New Revision: 2080

Log:
Disable "Too many models" error: can happen with a Decorator that is very very large. Decorator layout will be weird, but at least GME isnt in an infinite MessageBox loop and the user can continue to edit (and save)

Modified:
   trunk/GME/Gme/GMEView.cpp
   trunk/GME/Gme/GUIObject.cpp

Modified: trunk/GME/Gme/GMEView.cpp
==============================================================================
--- trunk/GME/Gme/GMEView.cpp	Thu Oct  4 10:12:09 2012	(r2079)
+++ trunk/GME/Gme/GMEView.cpp	Thu Oct  4 10:12:19 2012	(r2080)
@@ -4007,9 +4007,9 @@
 		if(!modelGrid.IsAvailable(obj)) {
 			CRect loc = obj->GetLocation();
 			if(!modelGrid.GetClosestAvailable(obj, loc)) {
-				AfxMessageBox(_T("Too Many Models! Internal Program Error!"),MB_OK | MB_ICONSTOP);
-				EndWaitCursor();
-				return;
+				//AfxMessageBox(_T("Too Many Models! Internal Program Error!"),MB_OK | MB_ICONSTOP);
+				//EndWaitCursor();
+				break;
 			}
 			// ASSERT(modelGrid.IsAvailable(loc));
 			if (!executingPendingRequests && !IsInstance()) {
@@ -8994,8 +8994,8 @@
 
 	if (!modelGrid.IsAvailable(obj, aspectIndexFrom)) {//is enough space to occupy the pos taken from the aspFrom aspect?
 		if (!modelGrid.GetClosestAvailable(obj, loc, aspectIndexTo)) { // if cannot get any position close to the position got above
-			AfxMessageBox(_T("Too Many Models! Internal Program Error!"),MB_OK | MB_ICONSTOP);
-			throw hresult_exception();
+			//AfxMessageBox(_T("Too Many Models! Internal Program Error!"),MB_OK | MB_ICONSTOP);
+			//throw hresult_exception();
 		}
 	}
 	obj->SetLocation(loc, aspectIndexTo);

Modified: trunk/GME/Gme/GUIObject.cpp
==============================================================================
--- trunk/GME/Gme/GUIObject.cpp	Thu Oct  4 10:12:09 2012	(r2079)
+++ trunk/GME/Gme/GUIObject.cpp	Thu Oct  4 10:12:19 2012	(r2080)
@@ -1734,8 +1734,8 @@
 		CRect rect = obj->GetLocation();
 		rect.MoveToXY(rect.left + shiftBy.x, rect.top + shiftBy.y);
 		if(!modelGrid.GetClosestAvailable(obj, rect)) {
-			AfxMessageBox(_T("Too Many Models! Internal Program Error!"),MB_OK | MB_ICONSTOP);
-			return;
+			//AfxMessageBox(_T("Too Many Models! Internal Program Error!"),MB_OK | MB_ICONSTOP);
+			//return;
 		}
 		obj->SetLocation(rect);
 		modelGrid.Set(obj);


More information about the gme-commit mailing list