script for match string of keywords

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@353 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-05-13 15:43:28 +00:00
parent 7bad8154e3
commit d2b4640bda
4 changed files with 6 additions and 0 deletions
+3
View File
@@ -136,6 +136,9 @@ void SetScriptManager::onAction(const Action& action, bool undone) {
KeywordTextValue* value = dynamic_cast<KeywordTextValue*>(action.valueP.get());
if (value) {
if (value->underlying == &value->keyword.match) {
// script
Context& ctx = getContext(set.stylesheet);
value->update(ctx);
// changed the 'match' string of a keyword, rebuild database and regex so matching is correct
value->keyword.prepare(set.game->keyword_parameter_types, true);
set.keyword_db.clear();