[commit] r1270 - trunk/GME/ObjectInspector
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Wed Apr 13 14:45:32 CDT 2011
Author: ksmyth
Date: Wed Apr 13 14:45:32 2011
New Revision: 1270
Log:
Fixes GME-354: CListBox::SetItemHeight takes a maximum 255 height
Modified:
trunk/GME/ObjectInspector/Attribute.cpp
trunk/GME/ObjectInspector/InspectorList.cpp
Modified: trunk/GME/ObjectInspector/Attribute.cpp
==============================================================================
--- trunk/GME/ObjectInspector/Attribute.cpp Wed Apr 13 12:48:33 2011 (r1269)
+++ trunk/GME/ObjectInspector/Attribute.cpp Wed Apr 13 14:45:32 2011 (r1270)
@@ -315,7 +315,8 @@
// Converting to int
CString strLineNum(bstrMultiLinePref);
int nLineNumMin = _tstoi(strLineNum);
- const int nLineNumMax = 32;
+ const int nLineNumMax = 15;
+ static_assert(nLineNumMax * INSP_DEFAULT_ITEM_HEIGHT <= 255, "nLineNumMax is too big for SetItemHeight");
if(nLineNumMin<2) // Single line edit box
{
Modified: trunk/GME/ObjectInspector/InspectorList.cpp
==============================================================================
--- trunk/GME/ObjectInspector/InspectorList.cpp Wed Apr 13 12:48:33 2011 (r1269)
+++ trunk/GME/ObjectInspector/InspectorList.cpp Wed Apr 13 14:45:32 2011 (r1270)
@@ -728,6 +728,7 @@
void CInspectorList::UpdateItem(const CListItem &srcListItem, CListItem &dstListItem, int nIndex)
{
+ ASSERT(nIndex < GetCount());
dstListItem.CopyWithNoState(srcListItem);
@@ -741,7 +742,7 @@
}
else
{
- SetItemHeight(nIndex, nLineNum * INSP_DEFAULT_ITEM_HEIGHT);
+ VERIFY(SetItemHeight(nIndex, nLineNum * INSP_DEFAULT_ITEM_HEIGHT) != LB_ERR);
}
}
More information about the gme-commit
mailing list