Skip to content

Commit

Permalink
removed a previous speed optimization as it fails to update the left …
Browse files Browse the repository at this point in the history
…panel when a selection is started in a different element than the current one
  • Loading branch information
damien-git committed Mar 30, 2017
1 parent 5ce1eb7 commit 9093d8d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/src/cursor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,7 @@ class Cursor {
* Starting with start and end, the selection is reduced to
* avoid cutting elements, so that the selection can be cut.
*/
setSelection(Position start, Position end, {updateUI:true}) {
setSelection(Position start, Position end) {
if (selectionStart == start && selectionEnd == end) {
if (start == end) {
updateCaretPosition(false);
Expand Down Expand Up @@ -1196,7 +1196,7 @@ class Cursor {
}
if (selectionEnd != selectionStart)
hide();
if (updateUI && selectionStart != previousStart)
if (selectionStart != previousStart)
page.updateAfterPathChange();
}

Expand Down
2 changes: 1 addition & 1 deletion lib/src/web_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ class WebPage {
else
_selectionEnd = positions[0];
}
_cursor.setSelection(_selectionStart, _selectionEnd, updateUI:false);
_cursor.setSelection(_selectionStart, _selectionEnd);
}
event.preventDefault();
}
Expand Down

0 comments on commit 9093d8d

Please sign in to comment.