[commit] r2155 - trunk/GME/Gme
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Fri Mar 1 10:04:18 CST 2013
Author: ksmyth
Date: Fri Mar 1 10:04:18 2013
New Revision: 2155
Log:
Dont lose TreeBrowser focus when: 1. deleting a model that has an inactive model editor tab 2. undo/redo
Modified:
trunk/GME/Gme/ChildFrm.cpp
trunk/GME/Gme/GMEView.cpp
trunk/GME/Gme/MainFrm.h
Modified: trunk/GME/Gme/ChildFrm.cpp
==============================================================================
--- trunk/GME/Gme/ChildFrm.cpp Fri Feb 15 13:30:19 2013 (r2154)
+++ trunk/GME/Gme/ChildFrm.cpp Fri Mar 1 10:04:18 2013 (r2155)
@@ -144,8 +144,15 @@
sendEvent = true;
if(doClose)
+ {
+ // Avoid losing TreeBrowser focus when deleting this (inactive) model from the TreeBrowser
+ CMainFrame::theInstance->EnableActivateLastActive(FALSE);
// CFramewWnd::OnClose calls CMDIChildWnd::DestroyWindow
CMDIChildWndEx::OnClose();
+ // End avoid (and prevent flicker on opening new ChildFrms)
+ CMainFrame::theInstance->EnableActivateLastActive(TRUE);
+ }
+
// CMDIChildWndEx::OnClose: when the last ChildWnd is closed
// the document is considered closed and the title changes to Paradigm
Modified: trunk/GME/Gme/GMEView.cpp
==============================================================================
--- trunk/GME/Gme/GMEView.cpp Fri Feb 15 13:30:19 2013 (r2154)
+++ trunk/GME/Gme/GMEView.cpp Fri Mar 1 10:04:18 2013 (r2155)
@@ -6796,7 +6796,8 @@
if (IsInElementDecoratorOperation())
return;
theApp.mgaProject->Undo();
- this->SetFocus();
+ // Don't lose TreeBrowser focus
+ //this->SetFocus();
}
void CGMEView::OnEditRedo()
@@ -6805,7 +6806,8 @@
if (IsInElementDecoratorOperation())
return;
theApp.mgaProject->Redo();
- this->SetFocus();
+ // Don't lose TreeBrowser focus
+ //this->SetFocus();
}
void CGMEView::OnEditCopy()
Modified: trunk/GME/Gme/MainFrm.h
==============================================================================
--- trunk/GME/Gme/MainFrm.h Fri Feb 15 13:30:19 2013 (r2154)
+++ trunk/GME/Gme/MainFrm.h Fri Mar 1 10:04:18 2013 (r2155)
@@ -190,6 +190,10 @@
public:
void ShowNavigationAndModeToolbars(bool isVisible);
+ void EnableActivateLastActive(BOOL enable)
+ {
+ m_wndClientArea.GetMDITabs().EnableActivateLastActive(enable);
+ }
};
/////////////////////////////////////////////////////////////////////////////
More information about the gme-commit
mailing list