[commit] r2499 - trunk/SDK/DecoratorLib

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Thu Jun 19 09:43:52 CDT 2014


Author: ksmyth
Date: Thu Jun 19 09:43:52 2014
New Revision: 2499

Log:
DecoratorLib: Disable editing of labels (e.g. name, port label) for library objects by default

Modified:
   trunk/SDK/DecoratorLib/TextPart.cpp

Modified: trunk/SDK/DecoratorLib/TextPart.cpp
==============================================================================
--- trunk/SDK/DecoratorLib/TextPart.cpp	Thu Jun 19 09:43:44 2014	(r2498)
+++ trunk/SDK/DecoratorLib/TextPart.cpp	Thu Jun 19 09:43:52 2014	(r2499)
@@ -74,6 +74,13 @@
 void TextPart::InitializeEx(CComPtr<IMgaProject>& pProject, CComPtr<IMgaMetaPart>& pPart, CComPtr<IMgaFCO>& pFCO,
 							HWND parentWnd, PreferenceMap& preferences)
 {
+	VARIANT_BOOL libObject = VARIANT_FALSE;
+	if (pFCO) {
+		pFCO->get_IsLibObject(&libObject);
+	}
+	if (libObject != VARIANT_FALSE) {
+		m_bTextEditable = false;
+	}
 	// Check if editability is disabled/enabled
 	PreferenceMap::iterator it = preferences.find(PREF_ITEMEDITABLE);
 	if (it != preferences.end())


More information about the gme-commit mailing list