[GME-commit] GMESRC/GME/Gme GMEBrowser.cpp,1.29,1.30 GMEBrowser.h,1.10,1.11 GMEDoc.cpp,1.31,1.32

gme-commit at list.isis.vanderbilt.edu gme-commit at list.isis.vanderbilt.edu
Tue Feb 14 18:51:25 CST 2006


Update of /project/gme-repository/GMESRC/GME/Gme
In directory escher:/tmp/cvs-serv17228

Modified Files:
	GMEBrowser.cpp GMEBrowser.h GMEDoc.cpp 
Log Message:
Updated accordingly to ActiveBrowser's new events. [ShowInParent]


CVS User: Zoltan Molnar, ISIS (zolmol)

Index: GMEBrowser.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Gme/GMEBrowser.cpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** GMEBrowser.cpp	12 Jan 2005 17:53:16 -0000	1.29
--- GMEBrowser.cpp	14 Feb 2006 18:51:23 -0000	1.30
***************
*** 75,78 ****
--- 75,85 ----
  }
  
+ void CGMEBrowser::ShowObjectInParent( LPUNKNOWN selected)
+ {
+ 	if (CGMEDoc::theInstance) {
+ 		CGMEDoc::theInstance->ShowObject(selected, true);
+ 	}
+ }
+ 
  void CGMEBrowser::FocusItem(BSTR Id)
  {
***************
*** 130,133 ****
--- 137,141 ----
  	ON_EVENT(CGMEBrowser, IDC_GME_ACTIVE_BROWSER_CTRL, 4 /* ShowProperties */, OnShowPropertiesGmeActiveBrowserCtrl, VTS_NONE)
  	ON_EVENT(CGMEBrowser, IDC_GME_ACTIVE_BROWSER_CTRL, 5 /* ClickMgaObject */, OnClickMgaObjectGmeActiveBrowserCtrl, VTS_UNKNOWN)
+ 	ON_EVENT(CGMEBrowser, IDC_GME_ACTIVE_BROWSER_CTRL, 6 /* ShowInParentMgaObject */, OnShowInParentMgaObjectGmeActiveBrowserCtrl, VTS_UNKNOWN)
  	//}}AFX_EVENTSINK_MAP
  END_EVENTSINK_MAP()
***************
*** 290,292 ****
--- 298,305 ----
  {
  	SetCurrObject(pMgaObject);
+ }
+ 
+ void CGMEBrowser::OnShowInParentMgaObjectGmeActiveBrowserCtrl(LPUNKNOWN pMgaObject) 
+ {
+ 	ShowObjectInParent(pMgaObject);
  }

Index: GMEBrowser.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Gme/GMEBrowser.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** GMEBrowser.h	5 May 2005 18:43:42 -0000	1.10
--- GMEBrowser.h	14 Feb 2006 18:51:23 -0000	1.11
***************
*** 26,29 ****
--- 26,30 ----
  	void RefreshAll();
  	void ShowObject(LPUNKNOWN selected);
+ 	void ShowObjectInParent( LPUNKNOWN selected);
  	void FocusItem(BSTR Id);
  	void ShowAttrPref(bool isAttr, LPUNKNOWN selected);
***************
*** 74,77 ****
--- 75,79 ----
  	afx_msg void OnShowPropertiesGmeActiveBrowserCtrl();
  	afx_msg void OnClickMgaObjectGmeActiveBrowserCtrl(LPUNKNOWN pMgaObject);
+ 	afx_msg void OnShowInParentMgaObjectGmeActiveBrowserCtrl(LPUNKNOWN pMgaObject);
  	DECLARE_EVENTSINK_MAP()
  	//}}AFX_MSG

Index: GMEDoc.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Gme/GMEDoc.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** GMEDoc.cpp	30 Jan 2006 20:47:54 -0000	1.31
--- GMEDoc.cpp	14 Feb 2006 18:51:23 -0000	1.32
***************
*** 551,554 ****
--- 551,559 ----
  				COMTHROW(theApp.mgaProject->CreateTerritory(NULL, &terr));
  				COMTHROW(theApp.mgaProject->BeginTransaction(terr));
+ 				CComPtr<IMgaModel> tmpmod = model; // put model into the active territory
+ 				model = NULL;
+ 				CComPtr<IMgaFCO> fco_mod;
+ 				COMTHROW(terr->OpenFCO(tmpmod, &fco_mod)); // OpenFCO fills an IMgaFCO
+ 				COMTHROW( fco_mod.QueryInterface( &model));// casted to IMgaModel
  			}
  			CComPtr<IMgaObject> parent;
***************
*** 557,560 ****
--- 562,567 ----
  			model = NULL;
  			COMTHROW(parent.QueryInterface(&model));
+ 			// it might be invoked from the ActiveBrowser (on a top model)
+ 			// in which case line above must throw if parent is a folder
  
  			if (!inTrans) 



More information about the GME-commit mailing list