From 8cbe19a3e1845657ccdfddbd3c4fffcaadb9ff55 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Tue, 27 May 2008 14:04:01 +0000 Subject: [FIX] Item widget works better [FIX] FractionWidget value is updated at ctor [FIX] Non-script KTextEdit is now a KLineEdit [FIX] Rules not being set git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@179 6ecfd1a5-f3ed-3746-8530-beee90d26b22 --- pokemodr/ScriptWidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pokemodr/ScriptWidget.cpp') diff --git a/pokemodr/ScriptWidget.cpp b/pokemodr/ScriptWidget.cpp index addb14ba..cdde5c83 100644 --- a/pokemodr/ScriptWidget.cpp +++ b/pokemodr/ScriptWidget.cpp @@ -39,7 +39,9 @@ void ScriptWidget::setValue(const Script& value) return; m_value = value; varInterpreter->setEditText(m_value.interpreter()); + QTextCursor cursor = varScript->textCursor(); varScript->setPlainText(m_value.script()); + varScript->setTextCursor(cursor); emit(valueChanged(m_value)); } @@ -51,8 +53,6 @@ void ScriptWidget::on_varInterpreter_activated(const QString& interpreter) void ScriptWidget::on_varScript_textChanged() { - QTextCursor cursor = varScript->textCursor(); m_value.setScript(varScript->toPlainText()); - varScript->setTextCursor(cursor); emit(valueChanged(m_value)); } -- cgit