summaryrefslogtreecommitdiffstats
path: root/src/ui/toolbar/text-toolbar.cpp
diff options
context:
space:
mode:
authorJabiertxof <jabier.arraiza@marker.es>2019-09-10 11:31:51 +0000
committerJabiertxof <jabier.arraiza@marker.es>2019-09-10 11:31:51 +0000
commit772b2d1cd24517542e713899e91db095d36b0693 (patch)
tree79ee5ef306b169f90a95f228e397111d21a2ef21 /src/ui/toolbar/text-toolbar.cpp
parentFix a focus issue pointed by Tav (diff)
downloadinkscape-772b2d1cd24517542e713899e91db095d36b0693.tar.gz
inkscape-772b2d1cd24517542e713899e91db095d36b0693.zip
fix a subselection issue
Diffstat (limited to 'src/ui/toolbar/text-toolbar.cpp')
-rw-r--r--src/ui/toolbar/text-toolbar.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/ui/toolbar/text-toolbar.cpp b/src/ui/toolbar/text-toolbar.cpp
index 8a519c811..0f7cff822 100644
--- a/src/ui/toolbar/text-toolbar.cpp
+++ b/src/ui/toolbar/text-toolbar.cpp
@@ -2418,13 +2418,6 @@ void TextToolbar::subselection_changed(gpointer texttool)
Inkscape::Text::Layout::iterator start = layout->begin();
Inkscape::Text::Layout::iterator end = layout->end();
Inkscape::Text::Layout::iterator start_selection = tc->text_sel_start;
- if (!(_updating || tc->_button1on)) {
- if (tc->text_sel_start > tc->text_sel_end) {
- tc->text_sel_start = tc->text_sel_end;
- tc->text_sel_end = start_selection;
- }
- start_selection = tc->text_sel_start;
- }
Inkscape::Text::Layout::iterator end_selection = tc->text_sel_end;
#ifdef DEBUG_TEXT
std::cout << " GUI: Start of text: " << layout->iteratorToCharIndex(start) << std::endl;
@@ -2479,8 +2472,13 @@ void TextToolbar::subselection_changed(gpointer texttool)
this->_outer = false;
wrap_start = tc->text_sel_start;
wrap_end = tc->text_sel_end;
- wrap_start.thisStartOfLine();
- wrap_end.thisEndOfLine();
+ if (tc->text_sel_start > tc->text_sel_end) {
+ wrap_start.thisEndOfLine();
+ wrap_end.thisStartOfLine();
+ } else {
+ wrap_start.thisStartOfLine();
+ wrap_end.thisEndOfLine();
+ }
selection_changed(nullptr);
}
}