mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 05:07:00 -04:00
Reduce coupling between ValueEditors/Viewers and Set and StyleSheet.
- Adding of actions is done with an addAction function
- Files are read from
- getStylePackage for styling stuff (this is stylesheet)
- getLocalPackage for symbol and image values (this was the set)
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@970 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -96,9 +96,9 @@ void KeywordList::updateUsageStatistics() {
|
||||
|
||||
// ----------------------------------------------------------------------------- : Clipboard
|
||||
|
||||
bool KeywordList::canCopy() const { return !!selected_item; }
|
||||
bool KeywordList::canCut() const { return canCopy() && !getKeyword()->fixed; }
|
||||
bool KeywordList::canPaste() const {
|
||||
bool KeywordList::canDelete() const { return !getKeyword()->fixed; }
|
||||
bool KeywordList::canCopy() const { return !!selected_item; }
|
||||
bool KeywordList::canPaste() const {
|
||||
return wxTheClipboard->IsSupported(KeywordDataObject::format);
|
||||
}
|
||||
|
||||
@@ -127,14 +127,14 @@ bool KeywordList::doPaste() {
|
||||
// add keyword to set
|
||||
KeywordP keyword = data.getKeyword(set);
|
||||
if (keyword) {
|
||||
set->actions.add(new AddKeywordAction(ADD, *set, keyword));
|
||||
set->actions.addAction(new AddKeywordAction(ADD, *set, keyword));
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
bool KeywordList::doDelete() {
|
||||
set->actions.add(new AddKeywordAction(REMOVE, *set, getKeyword()));
|
||||
set->actions.addAction(new AddKeywordAction(REMOVE, *set, getKeyword()));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user