[commit] r1431 - trunk/GME/GMEActiveBrowser

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Mon Jul 25 15:25:42 CDT 2011


Author: ksmyth
Date: Mon Jul 25 15:25:42 2011
New Revision: 1431

Log:
Fix window layout. Fix: select W-Z and expanding A-D made newly-expanded node not visible

Modified:
   trunk/GME/GMEActiveBrowser/ActiveBrowserPropertyPage.cpp
   trunk/GME/GMEActiveBrowser/MgaContext.cpp

Modified: trunk/GME/GMEActiveBrowser/ActiveBrowserPropertyPage.cpp
==============================================================================
--- trunk/GME/GMEActiveBrowser/ActiveBrowserPropertyPage.cpp	Mon Jul 25 14:49:05 2011	(r1430)
+++ trunk/GME/GMEActiveBrowser/ActiveBrowserPropertyPage.cpp	Mon Jul 25 15:25:42 2011	(r1431)
@@ -6,7 +6,7 @@
 #include "ActiveBrowserPropertyPage.h"
 #include "GMEActiveBrowser.h"
 #include "GMEActiveBrowserCtl.h"
-#include "..\Interfaces\Meta_i.c"
+#include "Meta_i.c"
 #include "AggregateContextMenu.h"
 #include "..\Gme\GMEOLEData.h"
 #include "AttachLibDlg.h"
@@ -106,10 +106,12 @@
 //	CPropertyPage::OnSize(nType, cx, cy);
 	if(	::IsWindow(m_ComboSearchCtrl.GetSafeHwnd()) )
 	{
+		int ySpace = GetSystemMetrics(SM_CYBORDER);
+		RECT clientRect;
+		m_ComboSearchCtrl.GetClientRect(&clientRect);
 		
-		
-		m_TreeAggregate.MoveWindow(3,25,cx-3,cy-25);
-		m_ComboSearchCtrl.MoveWindow(3,3,cx-3,20);
+		m_TreeAggregate.MoveWindow(0, clientRect.bottom + 2*ySpace, cx-1, cy-clientRect.bottom - 2*ySpace - 1);
+		m_ComboSearchCtrl.MoveWindow(0, ySpace, cx-1, cy-1);
 
 		//////////////////////////////////////////////////////////////////////////////////////////
 		//m_ComboSearchCtrl.MoveWindow(3,3,cx-29,20);
@@ -207,6 +209,7 @@
 					
 				}
 			}
+			m_TreeAggregate.EnsureVisible(hItem);
 			AfxGetApp()->LoadStandardCursor(IDC_ARROW);
 		}
 #ifdef _DEBUG
@@ -2812,9 +2815,12 @@
 	
 	if(	::IsWindow(m_ComboSearchCtrl.GetSafeHwnd()) )
 	{
-		m_ComboSearchCtrl.MoveWindow(3,3,cx-3,20);
-
-		m_TreeInheritance.MoveWindow(3,25,cx-3,cy-25);
+		int ySpace = GetSystemMetrics(SM_CYBORDER);
+		RECT clientRect;
+		m_ComboSearchCtrl.GetClientRect(&clientRect);
+		
+		m_TreeInheritance.MoveWindow(0, clientRect.bottom + 2*ySpace, cx-1, cy-clientRect.bottom - 2*ySpace - 1);
+		m_ComboSearchCtrl.MoveWindow(0, ySpace, cx-1, cy-1);
 	}
 	
 }
@@ -3432,9 +3438,12 @@
 	
 	if(	::IsWindow(m_ComboSearchCtrl.GetSafeHwnd()) )
 	{
-		m_ComboSearchCtrl.MoveWindow(3,3,cx-3,20);
-
-		m_TreeMeta.MoveWindow(3,25,cx-3,cy-25);
+		int ySpace = GetSystemMetrics(SM_CYBORDER);
+		RECT clientRect;
+		m_ComboSearchCtrl.GetClientRect(&clientRect);
+		
+		m_TreeMeta.MoveWindow(0, clientRect.bottom + 2*ySpace, cx-1, cy-clientRect.bottom - 2*ySpace - 1);
+		m_ComboSearchCtrl.MoveWindow(0, ySpace, cx-1, cy-1);
 	}
 	
 }

Modified: trunk/GME/GMEActiveBrowser/MgaContext.cpp
==============================================================================
--- trunk/GME/GMEActiveBrowser/MgaContext.cpp	Mon Jul 25 14:49:05 2011	(r1430)
+++ trunk/GME/GMEActiveBrowser/MgaContext.cpp	Mon Jul 25 15:25:42 2011	(r1431)
@@ -149,7 +149,7 @@
 	{
 		CComBSTR name;
 		COMTHROW(MGACOLL_ITER->get_ComponentName(&name));
-		if(name == "ConstraintManager") 
+		if(name == L"ConstraintManager") 
 		{
 			constrMgr = CComQIPtr<IMgaComponentEx>(MGACOLL_ITER); 
 			break;


More information about the gme-commit mailing list