diff options
Diffstat (limited to 'vcl/jsdialog/executor.cxx')
-rw-r--r-- | vcl/jsdialog/executor.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx index 5598afa8ba19..e0d0cbb323f3 100644 --- a/vcl/jsdialog/executor.cxx +++ b/vcl/jsdialog/executor.cxx @@ -361,12 +361,15 @@ bool ExecuteAction(const std::string& nWindowId, const OString& rWidget, StringM } } - auto pTextView = dynamic_cast<weld::TextView*>(pWidget); + auto pTextView = dynamic_cast<JSTextView*>(pWidget); if (pTextView) { if (sAction == "change") { - pTextView->set_text(rData["data"]); + int rStartPos, rEndPos; + pTextView->get_selection_bounds(rStartPos, rEndPos); + pTextView->set_text_without_notify(rData["data"]); + pTextView->select_region(rStartPos, rEndPos); LOKTrigger::trigger_changed(*pTextView); return true; } |