I'll definately do this today, so expect a full report later on

CE.
Moderators: CEGUI MVP, CEGUI Team
Code: Select all
Index: src/elements/CEGUIMultiColumnList.cpp
===================================================================
RCS file: /cvsroot/crayzedsgui/cegui_mk2/src/elements/CEGUIMultiColumnList.cpp,v
retrieving revision 1.21
diff -u -r1.21 CEGUIMultiColumnList.cpp
--- src/elements/CEGUIMultiColumnList.cpp 27 Feb 2005 14:21:22 -0000 1.21
+++ src/elements/CEGUIMultiColumnList.cpp 11 Mar 2005 13:25:59 -0000
@@ -809,8 +809,12 @@
// if sorting is enabled, insert at an appropriate position
if (getSortDirection() != ListHeaderSegment::None)
{
- // insert item and get insert position index.
- pos = (uint)std::distance(d_grid.begin(), d_grid.insert(std::upper_bound(d_grid.begin(), d_grid.end(), row), row));
+ // calculate where the row should be inserted
+ ListItemGrid::iterator ins_pos = std::upper_bound(d_grid.begin(), d_grid.end(), row);
+ // insert item and get final inserted position.
+ ListItemGrid::iterator final_pos = d_grid.insert(ins_pos, row);
+ // get final inserted position as an uint.
+ pos = (uint)std::distance(d_grid.begin(), final_pos);
}
// not sorted, just stick it on the end.
else
spannerman wrote:
Yes, thanks Eddie. Sorry I wasnt so helpful in the end with this...but I guess its all part of my learning how to debug properly
Return to “Modifications / Integrations / Customisations”
Users browsing this forum: No registered users and 11 guests