[commit] r1148 - trunk/SDK/DecoratorLib

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Thu Jan 27 17:07:38 CST 2011


Author: ksmyth
Date: Thu Jan 27 17:07:38 2011
New Revision: 1148

Log:
Enable resizing for .emf and .wmf icons

Modified:
   trunk/SDK/DecoratorLib/BitmapPart.cpp

Modified: trunk/SDK/DecoratorLib/BitmapPart.cpp
==============================================================================
--- trunk/SDK/DecoratorLib/BitmapPart.cpp	Thu Jan 27 17:07:21 2011	(r1147)
+++ trunk/SDK/DecoratorLib/BitmapPart.cpp	Thu Jan 27 17:07:38 2011	(r1148)
@@ -53,8 +53,6 @@
 void BitmapPart::InitializeEx(CComPtr<IMgaProject>& pProject, CComPtr<IMgaMetaPart>& pPart, CComPtr<IMgaFCO>& pFCO,
 							  HWND parentWnd, PreferenceMap& preferences)
 {
-	VectorPart::InitializeEx(pProject, pPart, pFCO, parentWnd, preferences);
-
 	CComPtr<IMgaMetaFCO> spMetaFCO;
 	if (!pFCO) {
 		CComPtr<IMgaMetaRole> spRole;
@@ -135,6 +133,8 @@
 #else
 			m_pBitmap = getFacilities().getBitmap(strIcon);
 #endif
+			if (strIcon.Right(4) == ".emf" || strIcon.Right(4) == ".wmf")
+				preferences[PREF_ITEMRESIZABLE] = PreferenceVariant(true);
 		}
 		if (!m_pBitmap) {
 			strIcon = *preferences.find(PREF_ICONDEFAULT)->second.uValue.pstrValue;
@@ -170,6 +170,8 @@
 		getFacilities().getPreference(m_spFCO, m_spMetaFCO, PREF_ROUNDCORNERRADIUS, m_bRoundCornerRadius, false);
 	}
 
+	VectorPart::InitializeEx(pProject, pPart, pFCO, parentWnd, preferences);
+
 	if (m_bCastShadow) {
 		SimpleCoordCommand* leftMost		= new SimpleCoordCommand(LeftMost);
 		SimpleCoordCommand* topMost			= new SimpleCoordCommand(TopMost);


More information about the gme-commit mailing list