[mapguide-commits] r4468 - trunk/Tools/Maestro/Maestro

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Wed Dec 23 16:39:00 EST 2009


Author: ksgeograf
Date: 2009-12-23 16:39:00 -0500 (Wed, 23 Dec 2009)
New Revision: 4468

Modified:
   trunk/Tools/Maestro/Maestro/EditorInterface.cs
Log:
Maestro:
Fixed issue #1201.

Modified: trunk/Tools/Maestro/Maestro/EditorInterface.cs
===================================================================
--- trunk/Tools/Maestro/Maestro/EditorInterface.cs	2009-12-23 21:28:33 UTC (rev 4467)
+++ trunk/Tools/Maestro/Maestro/EditorInterface.cs	2009-12-23 21:39:00 UTC (rev 4468)
@@ -175,6 +175,7 @@
 			if (Closing != null)
 				Closing(this, null);
 
+            int index = m_editor.tabItems.TabPages.IndexOf(m_page);
 			m_editor.tabItems.TabPages.Remove(m_page);
 			
 			foreach(KeyValuePair<string, EditorInterface> de in m_editor.OpenResourceEditors)
@@ -184,6 +185,9 @@
 					break;
 				}
 
+            if (m_editor.tabItems.TabPages.Count > 0 && m_editor.tabItems.SelectedIndex == 0)
+                m_editor.tabItems.SelectedIndex = Math.Max(0, Math.Min(index - 1, m_editor.tabItems.TabPages.Count));
+
 			return true;
 		}
 



More information about the mapguide-commits mailing list