[commit] r2192 - trunk/GME/Gme
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Wed May 15 11:50:23 CDT 2013
Author: akos
Date: Wed May 15 11:50:23 2013
New Revision: 2192
Log:
Selected objects/connection remain selected across aspect change if still visible.
Modified:
trunk/GME/Gme/GMEView.cpp
trunk/GME/Gme/GMEView.h
Modified: trunk/GME/Gme/GMEView.cpp
==============================================================================
--- trunk/GME/Gme/GMEView.cpp Tue May 14 16:51:50 2013 (r2191)
+++ trunk/GME/Gme/GMEView.cpp Wed May 15 11:50:23 2013 (r2192)
@@ -1815,6 +1815,16 @@
}
}
+void CGMEView::UpdateConnectionSelection(int aspect)
+{
+ if (selectedConnection != NULL) {
+ if(!selectedConnection->IsVisible(aspect)) {
+ selectedConnection->SetSelect(false);
+ selectedConnection = NULL;
+ }
+ }
+}
+
void CGMEView::ResetParent(bool doInvalidate)
{
#if !defined (ACTIVEXGMEVIEW)
@@ -4394,9 +4404,19 @@
FillModelGrid();
AutoRoute(); // HACK we may have size change here, reroute the whole thing for now
this->SendUnselEvent4List( &selected);
- selected.RemoveAll();
+
+ // Keep selection active if it is still visible in the new aspect
+ POSITION pos = selected.GetHeadPosition();
+ while( pos != NULL ) {
+ POSITION oldPos = pos;
+ CGuiFco *gfco = selected.GetNext(pos);
+ if(!gfco->IsVisible(currentAspect->index))
+ selected.RemoveAt(oldPos);
+ }
+ UpdateConnectionSelection(currentAspect->index);
+
RemoveAllAnnotationFromSelection();
- ClearConnectionSelection();
+
ChangeAttrPrefObjs(selected);
Modified: trunk/GME/Gme/GMEView.h
==============================================================================
--- trunk/GME/Gme/GMEView.h Tue May 14 16:51:50 2013 (r2191)
+++ trunk/GME/Gme/GMEView.h Wed May 15 11:50:23 2013 (r2192)
@@ -234,6 +234,7 @@
void RemoveAnnotationFromSelectionHead(void);
void RemoveAnnotationFromSelection(POSITION annPos);
void ClearConnectionSelection(void);
+ void UpdateConnectionSelection(int aspect);
bool FollowLine(CGuiConnection* guiConn, bool reverse, bool tryPort);
bool FollowLine(CGuiObject* guiObj, bool reverse, bool tryPort);
bool FollowLine(CGuiPort* guiPort, bool reverse, bool tryPort);
More information about the gme-commit
mailing list