tweaks to dimension list control

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1048 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2008-08-04 14:15:07 +00:00
parent 48f1315cda
commit dd80a51e96
2 changed files with 31 additions and 10 deletions
+6 -3
View File
@@ -44,11 +44,14 @@ void GalleryList::selectColumn(size_t column) {
void GalleryList::select(size_t item, size_t column, bool event) {
if (item >= itemCount()) return;
// select
bool changes = false;
// select column
size_t old_active_column = active_column;
selectColumn(column);
onSelect(item, active_column, changes);
Column& col = columns[active_column];
// filter?
bool changes = col.selection != item;
onSelect(item, old_active_column, changes);
// select
size_t old_sel = col.selection;
col.selection = item;
changes |= col.selection != old_sel;