summaryrefslogtreecommitdiffstats
path: root/pokemodr/CoinListUI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'pokemodr/CoinListUI.cpp')
-rw-r--r--pokemodr/CoinListUI.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/pokemodr/CoinListUI.cpp b/pokemodr/CoinListUI.cpp
index 7669f879..b7b4a959 100644
--- a/pokemodr/CoinListUI.cpp
+++ b/pokemodr/CoinListUI.cpp
@@ -36,7 +36,7 @@ CoinListUI::~CoinListUI()
void CoinListUI::setGui()
{
varName->setText(static_cast<CoinList*>(modified())->name());
- varScript->setPlainText(static_cast<CoinList*>(modified())->script());
+ varScript->setValue(static_cast<CoinList*>(modified())->script());
}
void CoinListUI::apply()
@@ -57,9 +57,7 @@ void CoinListUI::on_varName_textChanged(const QString& name)
static_cast<CoinList*>(modified())->setName(name);
}
-void CoinListUI::on_varScript_textChanged()
+void CoinListUI::on_varScript_valueChanged(const Script& script)
{
- QTextCursor cursor = varScript->textCursor();
- static_cast<CoinList*>(modified())->setScript(varScript->toPlainText());
- varScript->setTextCursor(cursor);
+ static_cast<CoinList*>(modified())->setScript(script);
}