[commit] r2503 - trunk/GME/Gme

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Thu Jul 3 08:12:18 CDT 2014


Author: ksmyth
Date: Thu Jul  3 08:12:18 2014
New Revision: 2503

Log:
Fix closing last tab: should activate new last tab, not the first tab

Modified:
   trunk/GME/Gme/MainFrm.h

Modified: trunk/GME/Gme/MainFrm.h
==============================================================================
--- trunk/GME/Gme/MainFrm.h	Tue Jul  1 14:01:21 2014	(r2502)
+++ trunk/GME/Gme/MainFrm.h	Thu Jul  3 08:12:18 2014	(r2503)
@@ -27,7 +27,12 @@
 			return GetTabWnd(m_iActiveTab);
 		}
 		// this is a hack to fix the tab behavior when you close the current tab
+		// Activate the next tab (same tab index), except if the last tab was closed. In that case, activate the new last tab (index - 1)
 		EnableActivateLastVisible(TRUE);
+		if (GetTabsNum() == m_iActiveTab)
+		{
+			m_iActiveTab--;
+		}
 		iTabNum = m_iActiveTab;
 		return GetTabWnd(m_iActiveTab);
 	}


More information about the gme-commit mailing list