summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-07-21 15:33:55 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-07-21 18:16:41 +0200
commit17ab82e522faad75bdbcea1ab9a16cc9953c9d79 (patch)
tree808f1aa2096a9a9e87a8877a7831f9be2bb397cf /dbaccess
parentcd8ad90593232703e36e334c66ece8514ac915ae (diff)
replace all the text, not the selection
we want to restore the cursor to as close to the current selection as possible, not just to replace a selected region Change-Id: I1f1d77e69d92772d620656799347312a556ccebd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99152 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/control/SqlNameEdit.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/dbaccess/source/ui/control/SqlNameEdit.cxx b/dbaccess/source/ui/control/SqlNameEdit.cxx
index 2b280a82c325..c24e9fd3cfaf 100644
--- a/dbaccess/source/ui/control/SqlNameEdit.cxx
+++ b/dbaccess/source/ui/control/SqlNameEdit.cxx
@@ -73,8 +73,8 @@ namespace dbaui
int nStartPos, nEndPos;
m_xEntry->get_selection_bounds(nStartPos, nEndPos);
int nMin = std::min(nStartPos, nEndPos);
+ m_xEntry->set_text(sCorrected);
m_xEntry->select_region(nMin, nMin);
- m_xEntry->replace_selection(sCorrected);
m_xEntry->save_value();
}