[commit] r2599 - trunk/SDK/DecoratorLib
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Mon May 18 16:25:33 CDT 2015
Author: ksmyth
Date: Mon May 18 16:25:33 2015
New Revision: 2599
Log:
Fix decorator bugs: References to models weren't showing the correct icon. Models didn't have icons in PartBrowser
Modified:
trunk/SDK/DecoratorLib/ModelComplexPart.cpp
trunk/SDK/DecoratorLib/ReferenceBitmapPart.cpp
Modified: trunk/SDK/DecoratorLib/ModelComplexPart.cpp
==============================================================================
--- trunk/SDK/DecoratorLib/ModelComplexPart.cpp Mon May 18 16:19:17 2015 (r2598)
+++ trunk/SDK/DecoratorLib/ModelComplexPart.cpp Mon May 18 16:25:33 2015 (r2599)
@@ -333,9 +333,13 @@
if (pFCO) {
CString strIcon;
- getFacilities().getPreference(pFCO, PREF_ICON, strIcon);
- if (!strIcon.IsEmpty()) {
- preferences[PREF_ICON] = PreferenceVariant(strIcon);
+ if (preferences.find(PREF_ICON) != preferences.end()) {
+ strIcon = *preferences[PREF_ICON].uValue.pstrValue;
+ } else {
+ getFacilities().getPreference(pFCO, PREF_ICON, strIcon);
+ if (!strIcon.IsEmpty()) {
+ preferences[PREF_ICON] = PreferenceVariant(strIcon);
+ }
}
PreferenceMap::iterator it = preferences.find(PREF_PORTLABELCOLOR);
@@ -1285,6 +1289,14 @@
CRect cRect = TypeableBitmapPart::GetBoxLocation(false);
cRect.BottomRight() -= CPoint(1, 1);
+ if (!m_spFCO) {
+ TypeableBitmapPart::DrawBackground(pDC, gdip);
+ return;
+ }
+ if (this->m_bReferenced) {
+ TypeableBitmapPart::DrawBackground(pDC, gdip);
+ return;
+ }
CRect location = cRect;
if (m_bmp && TypeableBitmapPart::m_bActive)
{
Modified: trunk/SDK/DecoratorLib/ReferenceBitmapPart.cpp
==============================================================================
--- trunk/SDK/DecoratorLib/ReferenceBitmapPart.cpp Mon May 18 16:19:17 2015 (r2598)
+++ trunk/SDK/DecoratorLib/ReferenceBitmapPart.cpp Mon May 18 16:25:33 2015 (r2599)
@@ -178,9 +178,13 @@
void ReferenceBitmapPart::Draw(CDC* pDC, Gdiplus::Graphics* gdip)
{
- TypeableBitmapPart::Draw(pDC, gdip);
+ VectorPart::Draw(pDC, gdip);
+
+ DrawBorder(pDC, gdip);
+ DrawBackground(pDC, gdip);
if (m_referencedPart != NULL)
m_referencedPart->Draw(pDC, gdip);
+ DrawIcons(pDC, gdip);
}
void ReferenceBitmapPart::SaveState()
@@ -295,8 +299,8 @@
}
mapRefPrefs[PREF_VIOLATED] = PreferenceVariant(false);
- pReferenced->InitializeEx(pProject, pPart, spReferenced, parentWnd, mapRefPrefs);
pReferenced->SetReferenced(true);
+ pReferenced->InitializeEx(pProject, pPart, spReferenced, parentWnd, mapRefPrefs);
} else {
m_lBorderWidth = 0;
CString strIcon;
More information about the gme-commit
mailing list