[GME-commit] GMESRC/GME/GMEActiveBrowser AggregateTreeCtrl.cpp,1.22,1.23 AggregateTreeCtrl.h,1.6,1.7

gme-commit at list.isis.vanderbilt.edu gme-commit at list.isis.vanderbilt.edu
Tue May 10 19:09:15 CDT 2005


Update of /project/gme-repository/GMESRC/GME/GMEActiveBrowser
In directory escher:/tmp/cvs-serv3963

Modified Files:
	AggregateTreeCtrl.cpp AggregateTreeCtrl.h 
Log Message:
Huge bug corrected. When i introduced the Paste Special menu, i modified a virtual method's 
signature, thus breaking the drag&drop functionality of the activebrowser.



CVS User: Zoltan Molnar, ISIS (zolmol)

Index: AggregateTreeCtrl.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/GMEActiveBrowser/AggregateTreeCtrl.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** AggregateTreeCtrl.h	5 Jan 2005 19:58:12 -0000	1.6
--- AggregateTreeCtrl.h	10 May 2005 18:09:12 -0000	1.7
***************
*** 26,30 ****
      
  	void SetItemProperties(HTREEITEM hItem);
! 	BOOL DoDrop(eDragOperation doDragOp, COleDataObject *pDataObject, CPoint point, bool copy_closure = false, bool disable_constr_manag = false);
  	BOOL DoDropWithoutChecking(eDragOperation doDragOp, COleDataObject *pDataObject, CPoint point);
  	BOOL IsRelevantDropTarget(CPoint point,CImageList*);
--- 26,30 ----
      
  	void SetItemProperties(HTREEITEM hItem);
! 	BOOL DoDrop(eDragOperation doDragOp, COleDataObject *pDataObject, CPoint point);
  	BOOL DoDropWithoutChecking(eDragOperation doDragOp, COleDataObject *pDataObject, CPoint point);
  	BOOL IsRelevantDropTarget(CPoint point,CImageList*);

Index: AggregateTreeCtrl.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/GMEActiveBrowser/AggregateTreeCtrl.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** AggregateTreeCtrl.cpp	26 Jan 2005 17:28:25 -0000	1.22
--- AggregateTreeCtrl.cpp	10 May 2005 18:09:12 -0000	1.23
***************
*** 736,740 ****
  }
  
! BOOL CAggregateTreeCtrl::DoDrop(eDragOperation doDragOp, COleDataObject *pDataObject, CPoint point, bool copy_closure, bool disable_constr_manag)
  {
  	MGATREECTRL_LOGEVENT("CAggregateTreeCtrl::DoDrop\r\n");
--- 736,740 ----
  }
  
! BOOL CAggregateTreeCtrl::DoDrop(eDragOperation doDragOp, COleDataObject *pDataObject, CPoint point)
  {
  	MGATREECTRL_LOGEVENT("CAggregateTreeCtrl::DoDrop\r\n");
***************
*** 746,752 ****
  	if( doDragOp == DRAGOP_INSTANCE)
  		_t = " INSTANCE\r\n";
! 	if( doDragOp == DRAGOP_COPY && copy_closure)
! 		_t = " CLOSURE PASTE\r\n";
! 	else if( doDragOp == DRAGOP_COPY && !copy_closure)
  		_t = " PASTE\r\n";
  
--- 746,750 ----
  	if( doDragOp == DRAGOP_INSTANCE)
  		_t = " INSTANCE\r\n";
! 	if( doDragOp == DRAGOP_COPY)
  		_t = " PASTE\r\n";
  
***************
*** 786,795 ****
  		}
  			
- 		if( disable_constr_manag && pMgaContext && pMgaContext->m_ccpConstMgr) COMTHROW( pMgaContext->m_ccpConstMgr->Enable( false));
- 
  		bool res = CGMEDataSource::ParseXMLData(pDataObject, ccpTargetObject);
  		
- 		if( disable_constr_manag && pMgaContext && pMgaContext->m_ccpConstMgr) COMTHROW( pMgaContext->m_ccpConstMgr->Enable( true));
- 
  		return res?TRUE:FALSE;
  	}
--- 784,789 ----
***************
*** 1099,1103 ****
  {
  	MGATREECTRL_LOGEVENT("CAggregateTreeCtrl::DoDropWithoutChecking\r\n");
! 	return DoDrop( doDragOp, pDataObject, point, true, true);
  }
  
--- 1093,1105 ----
  {
  	MGATREECTRL_LOGEVENT("CAggregateTreeCtrl::DoDropWithoutChecking\r\n");
! 
! 	CGMEActiveBrowserApp* pApp=(CGMEActiveBrowserApp*)AfxGetApp();
! 	CMgaContext* pMgaContext=&pApp->m_CurrentProject.m_MgaContext;
! 
! 	if( pMgaContext && pMgaContext->m_ccpConstMgr) COMTHROW( pMgaContext->m_ccpConstMgr->Enable( false));
! 	BOOL res = DoDrop( doDragOp, pDataObject, point);
! 	if( pMgaContext && pMgaContext->m_ccpConstMgr) COMTHROW( pMgaContext->m_ccpConstMgr->Enable( true));
! 
! 	return res;
  }
  



More information about the GME-commit mailing list