[GME-commit] GMESRC/GME/GMEActiveBrowser ActiveBrowserPropertyPage.cpp,1.39,1.40 ActiveBrowserPropertyPage.h,1.12,1.13

gme-commit at list.isis.vanderbilt.edu gme-commit at list.isis.vanderbilt.edu
Wed Jan 19 17:47:27 CST 2005


Update of /var/lib/gme/GMESRC/GME/GMEActiveBrowser
In directory braindrain:/tmp/cvs-serv8667

Modified Files:
	ActiveBrowserPropertyPage.cpp ActiveBrowserPropertyPage.h 
Log Message:
Inheritance tree tested and the bugs corrected.


CVS User: zolmol

Index: ActiveBrowserPropertyPage.cpp
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/GMEActiveBrowser/ActiveBrowserPropertyPage.cpp,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** ActiveBrowserPropertyPage.cpp	19 Jan 2005 19:45:32 -0000	1.39
--- ActiveBrowserPropertyPage.cpp	19 Jan 2005 23:47:23 -0000	1.40
***************
*** 2399,2402 ****
--- 2399,2403 ----
  void CInheritancePropertyPage::OnMgaEvent(CComPtr<IMgaObject> ccpMgaObject, unsigned long lEventMask)
  {
+ 	if( !m_theCurrentRootFCO) return;
  	EVENT_TRACE("\n__________ MGA Event Handling Begin _________\n");
  
***************
*** 2567,2571 ****
  	if(m_pPrevSelectedItem==MgaObjectProxy.m_pMgaObject)
  	{
! 		return;
  	}
  	else
--- 2568,2572 ----
  	if(m_pPrevSelectedItem==MgaObjectProxy.m_pMgaObject)
  	{
! 		//return; // commented by ZolMol, recreate the tree always
  	}
  	else
***************
*** 2595,2599 ****
  		// Getting the root
  		reqFindInheritanceRoot(ccpMgaRootFCO);
! 
  		// Storing it in a member
  		m_theCurrentRootFCO = ccpMgaRootFCO;
--- 2596,2600 ----
  		// Getting the root
  		reqFindInheritanceRoot(ccpMgaRootFCO);
! 		
  		// Storing it in a member
  		m_theCurrentRootFCO = ccpMgaRootFCO;
***************
*** 2623,2626 ****
--- 2624,2630 ----
  void CInheritancePropertyPage::SetupTree2()
  {
+ 	ASSERT( m_theCurrentRootFCO != 0);
+ 	if( !m_theCurrentRootFCO) return; // if root not set then return
+ 
  	CGMEActiveBrowserApp* pApp=(CGMEActiveBrowserApp*)AfxGetApp();
  	CMgaContext* pMgaContext=&pApp->m_CurrentProject.m_MgaContext;
***************
*** 2642,2647 ****
  		pMgaContext->BeginTransaction();
  
- 		if( !m_theCurrentRootFCO) return; // if root not set then return
- 
  		long status;
  		COMTHROW(m_theCurrentRootFCO->get_Status(&status));
--- 2646,2649 ----
***************
*** 2661,2672 ****
  
  	}MSGCATCH("Error retrieving data for inheritance tab",pMgaContext->AbortTransaction();)	
- 
- 
- 	// Select the current item
- 	//HTREEITEM hSelectedItem;
- 	//m_TreeInheritance.m_MgaMap.LookupTreeItem(ccpMgaFCO,hSelectedItem);
- 	//m_TreeInheritance.SelectItem(hSelectedItem);
- 	//m_TreeInheritance.EnsureVisible(hSelectedItem);
- 
  }
  
--- 2663,2666 ----
***************
*** 2684,2688 ****
  		m_TreeInheritance.StoreState();
  		m_TreeInheritance.CleanUp();
! 		SetupTree2();
  		m_TreeInheritance.RestoreState();
  
--- 2678,2685 ----
  		m_TreeInheritance.StoreState();
  		m_TreeInheritance.CleanUp();
! 		if( m_theCurrentRootFCO)
! 			SetupTree2();
! 		else
! 			SetupTree(); 
  		m_TreeInheritance.RestoreState();
  
***************
*** 2713,2724 ****
  	{
  		// Iterate through the children FCOs
! 		MGACOLL_ITERATE(IMgaFCO, ccpChildrenFCOs) 
! 		{						
  			// Recursive call for each children
! 			reqBuildInheritanceTree(hItem,MGACOLL_ITER,nDepthLevel-1);						
! 			
  		} MGACOLL_ITERATE_END;
  	}
! 
  }
  
--- 2710,2721 ----
  	{
  		// Iterate through the children FCOs
! 		MGACOLL_ITERATE(IMgaFCO, ccpChildrenFCOs)
! 		{
  			// Recursive call for each children
! 			reqBuildInheritanceTree(hItem,MGACOLL_ITER,nDepthLevel-1);
! 
  		} MGACOLL_ITERATE_END;
  	}
! 	
  }
  
***************
*** 2746,2750 ****
  {
  	ResetRoot();
! 	SetupTree();	
  	return CPropertyPageEx::OnSetActive();
  }
--- 2743,2747 ----
  {
  	ResetRoot();
! 	SetupTree();
  	return CPropertyPageEx::OnSetActive();
  }
***************
*** 2894,2897 ****
--- 2891,2900 ----
  }
  
+ BOOL CMetaPropertyPage::OnSetActive() 
+ {
+ 	CActiveBrowserPropertySheet* pParent=(CActiveBrowserPropertySheet*)GetParent();
+ 	pParent->m_PageInheritance.ResetRoot();
+ 	return CPropertyPageEx::OnSetActive();
+ }
  
  void CMetaPropertyPage::OnSize(UINT nType, int cx, int cy) 

Index: ActiveBrowserPropertyPage.h
===================================================================
RCS file: /var/lib/gme/GMESRC/GME/GMEActiveBrowser/ActiveBrowserPropertyPage.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** ActiveBrowserPropertyPage.h	19 Jan 2005 19:45:32 -0000	1.12
--- ActiveBrowserPropertyPage.h	19 Jan 2005 23:47:23 -0000	1.13
***************
*** 234,237 ****
--- 234,238 ----
  	// ClassWizard generate virtual function overrides
  	//{{AFX_VIRTUAL(CMetaPropertyPage)
+ 	virtual BOOL OnSetActive();
  	protected:
  	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support



More information about the GME-commit mailing list