[GME-commit]
GMESRC/GME/Gme GMEApp.cpp,1.108,1.109 GMEDoc.cpp,1.19,1.20
GMEDoc.h,1.6,1.7
gme-commit at list.isis.vanderbilt.edu
gme-commit at list.isis.vanderbilt.edu
Tue Mar 9 15:18:57 CST 2004
Update of /var/lib/gme/GMESRC/GME/Gme
In directory braindrain:/tmp/cvs-serv26919/GME/Gme
Modified Files:
GMEApp.cpp GMEDoc.cpp GMEDoc.h
Log Message:
High priority constraints are now enforced on "close project". Not enforced on "abort project" and upon emergency events. (BUG#14)
CVS User: volgy
Index: GMEApp.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Gme/GMEApp.cpp,v
retrieving revision 1.108
retrieving revision 1.109
diff -C2 -d -r1.108 -r1.109
*** GMEApp.cpp 5 Mar 2004 21:50:01 -0000 1.108
--- GMEApp.cpp 9 Mar 2004 21:18:55 -0000 1.109
***************
*** 396,400 ****
BeginWaitCursor();
if(CGMEDoc::theInstance) {
! CGMEDoc::theInstance->OnCloseDocument();
}
EndWaitCursor();
--- 396,400 ----
BeginWaitCursor();
if(CGMEDoc::theInstance) {
! CGMEDoc::theInstance->OnCloseDocument(true);
}
EndWaitCursor();
***************
*** 1454,1458 ****
BeginWaitCursor();
if(CGMEDoc::theInstance)
! CGMEDoc::theInstance->OnCloseDocument();
EndWaitCursor();
}
--- 1454,1458 ----
BeginWaitCursor();
if(CGMEDoc::theInstance)
! CGMEDoc::theInstance->OnCloseDocument(true);
EndWaitCursor();
}
Index: GMEDoc.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Gme/GMEDoc.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** GMEDoc.cpp 17 Dec 2003 13:45:02 -0000 1.19
--- GMEDoc.cpp 9 Mar 2004 21:18:55 -0000 1.20
***************
*** 419,423 ****
}
! void CGMEDoc::OnCloseDocument()
{
CGMEEventLogger::LogGMEEvent("CGMEDoc::OnCloseDocument\r\n");
--- 419,423 ----
}
! void CGMEDoc::OnCloseDocument(bool suppressErrors)
{
CGMEEventLogger::LogGMEEvent("CGMEDoc::OnCloseDocument\r\n");
***************
*** 426,430 ****
CGMEView* view = dynamic_cast<CGMEView*>(GetNextView(pos));
ASSERT(view);
! view->SendCloseModelEvent();
}
--- 426,434 ----
CGMEView* view = dynamic_cast<CGMEView*>(GetNextView(pos));
ASSERT(view);
! bool canClose = view->SendCloseModelEvent();
! if ((!suppressErrors) && (!canClose)) {
! // View cannot be closed, eg.: constraint violations
! return;
! }
}
Index: GMEDoc.h
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/Gme/GMEDoc.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** GMEDoc.h 17 Dec 2003 13:45:02 -0000 1.6
--- GMEDoc.h 9 Mar 2004 21:18:55 -0000 1.7
***************
*** 57,61 ****
public:
virtual BOOL OnNewDocument();
! virtual void OnCloseDocument();
virtual BOOL OnOpenDocument(LPCTSTR lpszPathName);
//}}AFX_VIRTUAL
--- 57,61 ----
public:
virtual BOOL OnNewDocument();
! virtual void OnCloseDocument(bool suppressErrors = false);
virtual BOOL OnOpenDocument(LPCTSTR lpszPathName);
//}}AFX_VIRTUAL
More information about the GME-commit
mailing list