[GME-commit]
GMESRC/GME/Gme GMEConsole.cpp, 1.4, 1.5 GMEView.h, 1.78,
1.79 GMEView.cpp, 1.194, 1.195
gme-commit at list.isis.vanderbilt.edu
gme-commit at list.isis.vanderbilt.edu
Wed Sep 26 14:21:32 CDT 2007
- Previous message: [GME-commit]
GMESRC/GME/Gme MainFrm.h, 1.28, 1.29 MainFrm.cpp, 1.37, 1.38
- Next message: [GME-commit] GMESRC/GME/Core CoreAttribute.cpp, 1.20,
1.21 CoreBinFile.cpp, 1.19, 1.20 CoreBinFile.h, 1.12, 1.13
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /project/gme-repository/GMESRC/GME/Gme
In directory escher:/tmp/cvs-serv20474
Modified Files:
GMEConsole.cpp GMEView.h GMEView.cpp
Log Message:
ClearConsole command.
View handles some errror cases is detail:
when subtyped object can't be further subtyped
when reference can't be redirected because of holding connections.
DeleteObject will return false if transaction was aborted because of lack of permissions (think of multiuser). In such case collections might contain invalid entries (like: selected).
CVS User: Zoltan Molnar, ISIS (zolmol)
Index: GMEConsole.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Gme/GMEConsole.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** GMEConsole.cpp 15 Apr 2005 18:24:10 -0000 1.4
--- GMEConsole.cpp 26 Sep 2007 19:21:30 -0000 1.5
***************
*** 99,102 ****
--- 99,103 ----
void CGMEConsole::Clear()
{
+ m_Console.Clear();
}
Index: GMEView.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Gme/GMEView.cpp,v
retrieving revision 1.194
retrieving revision 1.195
diff -C2 -d -r1.194 -r1.195
*** GMEView.cpp 20 Jun 2007 17:16:00 -0000 1.194
--- GMEView.cpp 26 Sep 2007 19:21:30 -0000 1.195
***************
*** 438,441 ****
--- 438,442 ----
ON_COMMAND(ID_VIEW_HISTORYBACKKEY, OnHistoryBack)
ON_COMMAND(ID_VIEW_HISTORYFORWKEY, OnHistoryForw)
+ ON_COMMAND(ID_MULTIUSER_SHOWOWNER, OnViewMultiUserShowObjectOwner)
END_MESSAGE_MAP()
***************
*** 2674,2678 ****
}
! void CGMEView::DeleteObjects(CGuiObjectList &objectList)
{
bool brw_refresh_needed = false;
--- 2675,2679 ----
}
! bool CGMEView::DeleteObjects(CGuiObjectList &objectList)
{
bool brw_refresh_needed = false;
***************
*** 2683,2687 ****
AfxMessageBox("The following object(s) cannot be deleted: " + msg);
CGMEEventLogger::LogGMEEvent(" The following object(s) cannot be deleted: "+msg+"\r\n");
! return;
}
BeginWaitCursor();
--- 2684,2688 ----
AfxMessageBox("The following object(s) cannot be deleted: " + msg);
CGMEEventLogger::LogGMEEvent(" The following object(s) cannot be deleted: "+msg+"\r\n");
! return true;
}
BeginWaitCursor();
***************
*** 2736,2740 ****
}
EndWaitCursor();
! return;
}
EndWaitCursor();
--- 2737,2741 ----
}
EndWaitCursor();
! return false;
}
EndWaitCursor();
***************
*** 2742,2745 ****
--- 2743,2747 ----
if( brw_refresh_needed) CGMEBrowser::theInstance->RefreshAll();
this->SetFocus();
+ return true;
}
***************
*** 3003,3008 ****
#pragma warning(default: 4310) // cast truncates constant value
if((hr = currentModel->DeriveChildObject(fco,newRole,inst,&obj)) != S_OK) {
! AfxMessageBox(fcoName + " cannot be derived!");
! CGMEEventLogger::LogGMEEvent(" "+fcoName+" cannot be derived.\r\n");
normalExit = false;
break;
--- 3005,3017 ----
#pragma warning(default: 4310) // cast truncates constant value
if((hr = currentModel->DeriveChildObject(fco,newRole,inst,&obj)) != S_OK) {
! CString msg( (LPCTSTR) fcoName); msg += " cannot be derived! Some of its ancestors or descendants may be already derived!";
! if( hr == E_MGA_NOT_DERIVABLE)
! {
! if( !CGMEConsole::theInstance) AfxMessageBox( msg + " [Error code E_MGA_NOT_DERIVABLE]");
! else CGMEConsole::theInstance->Message( msg + " [Error code E_MGA_NOT_DERIVABLE]", MSG_ERROR);
! }
! else
! AfxMessageBox( msg);
! CGMEEventLogger::LogGMEEvent(" " + msg + " \r\n");
normalExit = false;
break;
***************
*** 3055,3060 ****
catch(hresult_exception e) {
AbortTransaction(e.hr);
! AfxMessageBox("Cannot redirect reference to specified object!");
! CGMEEventLogger::LogGMEEvent(" Cannot redirect reference to specified object.\r\n");
return false;
}
--- 3064,3079 ----
catch(hresult_exception e) {
AbortTransaction(e.hr);
! CGMEEventLogger::LogGMEEvent( " Cannot redirect reference to specified object.\r\n");
! const char* t1 = "Cannot redirect reference to specified object because of active connections!";
! const char* t2 = "Cannot redirect reference to specified object.";
! if( e.hr == E_MGA_REFPORTS_USED)
! {
! if( !CGMEConsole::theInstance) AfxMessageBox( t1);
! else CGMEConsole::theInstance->Message( t1, MSG_ERROR);
! }
! else
! if( CGMEConsole::theInstance) AfxMessageBox( t2);
! else CGMEConsole::theInstance->Message( t2, MSG_ERROR);
!
return false;
}
***************
*** 4822,4827 ****
GMEEVENTLOG_GUIOBJS(selected);
this->SendUnselEvent4List( &selected);
! DeleteObjects( selected);
! selected.RemoveAll();
}
--- 4841,4846 ----
GMEEVENTLOG_GUIOBJS(selected);
this->SendUnselEvent4List( &selected);
! if(DeleteObjects( selected))
! selected.RemoveAll();
}
***************
*** 5587,5590 ****
--- 5606,5619 ----
catch(hresult_exception e) {
AbortTransaction(e.hr);
+ const char* t1 = "Cannot clear reference because of active connections!";
+ const char* t2 = "Cannot clear reference.";
+ if( e.hr == E_MGA_REFPORTS_USED)
+ {
+ if( !CGMEConsole::theInstance) AfxMessageBox( t1);
+ else CGMEConsole::theInstance->Message( t1, MSG_ERROR);
+ }
+ else
+ if( !CGMEConsole::theInstance) AfxMessageBox( t2);
+ else CGMEConsole::theInstance->Message( t2, MSG_ERROR);
}
}
***************
*** 7465,7467 ****
--- 7494,7501 ----
{
CGMEObjectInspector::theInstance->CyclePanel( VARIANT_FALSE);
+ }
+
+ void CGMEView::OnViewMultiUserShowObjectOwner()
+ {
+ theApp.mgaProject->SourceControlObjectOwner( currentModId);
}
Index: GMEView.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Gme/GMEView.h,v
retrieving revision 1.78
retrieving revision 1.79
diff -C2 -d -r1.78 -r1.79
*** GMEView.h 3 May 2007 18:30:34 -0000 1.78
--- GMEView.h 26 Sep 2007 19:21:30 -0000 1.79
***************
*** 194,198 ****
bool FindObjects(CRect &rect,CGuiObjectList &objectList);
bool FindAnnotations(CRect &rect,CGuiAnnotatorList &annotatorList);
! void DeleteObjects(CGuiObjectList &objectList);
void DeleteAnnotations(CGuiAnnotatorList &annotatorList);
bool DeleteConnection(CGuiConnection *guiConn,bool checkAspect = true);
--- 194,198 ----
bool FindObjects(CRect &rect,CGuiObjectList &objectList);
bool FindAnnotations(CRect &rect,CGuiAnnotatorList &annotatorList);
! bool DeleteObjects(CGuiObjectList &objectList);
void DeleteAnnotations(CGuiAnnotatorList &annotatorList);
bool DeleteConnection(CGuiConnection *guiConn,bool checkAspect = true);
***************
*** 462,465 ****
--- 462,466 ----
afx_msg void OnKeyCycleObjInspectorFrwd();
afx_msg void OnKeyCycleObjInspectorBkwd();
+ afx_msg void OnViewMultiUserShowObjectOwner();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
- Previous message: [GME-commit]
GMESRC/GME/Gme MainFrm.h, 1.28, 1.29 MainFrm.cpp, 1.37, 1.38
- Next message: [GME-commit] GMESRC/GME/Core CoreAttribute.cpp, 1.20,
1.21 CoreBinFile.cpp, 1.19, 1.20 CoreBinFile.h, 1.12, 1.13
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the GME-commit
mailing list