[commit] r2427 - trunk/GME/Gme

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Thu Feb 13 12:52:55 CST 2014


Author: ksmyth
Date: Thu Feb 13 12:52:55 2014
New Revision: 2427

Log:
When switching from Vis mode, ToggleHover on hovered connection (if any). Fixes bug where the connection would still be bold

Modified:
   trunk/GME/Gme/GMEView.cpp
   trunk/GME/Gme/GMEView.h

Modified: trunk/GME/Gme/GMEView.cpp
==============================================================================
--- trunk/GME/Gme/GMEView.cpp	Thu Feb 13 12:52:46 2014	(r2426)
+++ trunk/GME/Gme/GMEView.cpp	Thu Feb 13 12:52:55 2014	(r2427)
@@ -625,6 +625,7 @@
 	guiMeta							= 0;
 	currentAspect					= 0;
 	currentSet						= 0;
+	last_Connection					= 0;
 	lastObject						= 0;
 	lastPort						= 0;
 	dragSource						= 0;
@@ -2831,6 +2832,11 @@
 void CGMEView::ModeChange()
 {
 	CGMEEventLogger::LogGMEEvent(_T("CGMEView::ModeChange in ")+path+name+_T("\r\n"));
+	if (last_Connection)
+	{
+		last_Connection->ToggleHover();
+		last_Connection = 0;
+	}
 	this->SendUnselEvent4List( &selected);
 	selected.RemoveAll();
 	ChangeAttrPrefObjs(selected);
@@ -9858,7 +9864,6 @@
 		CGuiObject *object = self? self->FindObject(point): 0;
 		// if object found, curr_Connection will be 0
 		CGuiConnection        *curr_Connection = object? 0: router.FindConnection( point);
-		static CGuiConnection *last_Connection = 0;
 		if( last_Connection != curr_Connection) // state change for at most two connections
 		{
 			if( last_Connection) last_Connection->ToggleHover(); // if a previous was selected, now it will become unselected
@@ -10573,7 +10578,7 @@
 	ASSERT( p_ccpMgaFCO);
 	if( !p_ccpMgaFCO) return;
 
-	static const CComBSTR bstrRegPath(L"namePosition");
+	const CComBSTR bstrRegPath(L"namePosition");
 	CString valString;
 	valString.Format(_T("%d"), val);
 	CComBSTR bstrValue( valString);
@@ -10588,7 +10593,7 @@
 	ASSERT( p_valRet);
 	if( !p_ccpMgaFCO) return false;
 
-	static const CComBSTR bstrRegPath(L"namePosition");
+	const CComBSTR bstrRegPath(L"namePosition");
 	CString strRegValue;
 
 	// Getting regnode

Modified: trunk/GME/Gme/GMEView.h
==============================================================================
--- trunk/GME/Gme/GMEView.h	Thu Feb 13 12:52:46 2014	(r2426)
+++ trunk/GME/Gme/GMEView.h	Thu Feb 13 12:52:55 2014	(r2427)
@@ -154,6 +154,7 @@
 	CGuiMetaAspect*			currentAspect;
 	CGuiFco*				contextSelection;
 	CGuiAnnotator*			contextAnnotation;
+	CGuiConnection *last_Connection;
 	CGuiSet*				currentSet;
 	CGuiPort*				contextPort;
 	CString					currentSetID;


More information about the gme-commit mailing list