Fixed keyword list after yesterdays multi select stuff

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@860 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2008-05-18 18:00:25 +00:00
parent 51ad215c54
commit 9a72bf6ac1
+7 -11
View File
@@ -57,24 +57,20 @@ void KeywordList::onChangeSet() {
} }
void KeywordList::onAction(const Action& action, bool undone) { void KeywordList::onAction(const Action& action, bool undone) {
/*TYPE_CASE(action, AddKeywordAction) { TYPE_CASE(action, AddKeywordAction) {
if (action.adding != undone) { if (action.action.adding != undone) {
// select the new keyword // select the new keyword
selectItem(action.keyword, false /*list will be refreshed anyway* /, true); selectItem(action.action.steps[0].item, false /*list will be refreshed anyway*/, true);
refreshList(); refreshList();
} else { } else {
long pos = selected_item_pos; long pos = selected_item_pos;
refreshList(); refreshList();
if (action.keyword == selected_item) { if (selected_item_pos == -1) {
// select the next keyword, if not possible, select the last // selected keyword was deleted, select the next
if (pos + 1 < GetItemCount()) { selectItemPos(pos, true);
selectItemPos(pos, true);
} else {
selectItemPos(GetItemCount() - 1, true);
}
} }
} }
}*/ // TODO!!! }
TYPE_CASE(action, ValueAction) { TYPE_CASE(action, ValueAction) {
if (!action.card) { if (!action.card) {
KeywordTextValue* value = dynamic_cast<KeywordTextValue*>(action.valueP.get()); KeywordTextValue* value = dynamic_cast<KeywordTextValue*>(action.valueP.get());