Commit 7ea1a995 authored by twanvl's avatar twanvl

No longer incorrectly showing caret

parent 6069b9e7
...@@ -584,11 +584,11 @@ void TextValueEditor::draw(RotatedDC& dc) { ...@@ -584,11 +584,11 @@ void TextValueEditor::draw(RotatedDC& dc) {
} }
void TextValueEditor::redrawSelection(size_t old_selection_start_i, size_t old_selection_end_i, bool old_drop_down_shown) { void TextValueEditor::redrawSelection(size_t old_selection_start_i, size_t old_selection_end_i, bool old_drop_down_shown) {
//% if (!isCurrent()) return;
//% if (old_drop_down_shown && dropDownShown()) return;
// Hide caret // Hide caret
wxCaret* caret = editor().GetCaret(); if (isCurrent()) {
if (caret->IsVisible()) caret->Hide(); wxCaret* caret = editor().GetCaret();
if (caret->IsVisible()) caret->Hide();
}
// Destroy the clientDC before reshowing the caret, prevent flicker on MSW // Destroy the clientDC before reshowing the caret, prevent flicker on MSW
{ {
// Move selection // Move selection
...@@ -619,7 +619,9 @@ void TextValueEditor::redrawSelection(size_t old_selection_start_i, size_t old_s ...@@ -619,7 +619,9 @@ void TextValueEditor::redrawSelection(size_t old_selection_start_i, size_t old_s
drawWordListIndicators(dc, true); drawWordListIndicators(dc, true);
} }
} }
showCaret(); if (isCurrent()) {
showCaret();
}
} }
// ----------------------------------------------------------------------------- : Other overrides // ----------------------------------------------------------------------------- : Other overrides
...@@ -1279,6 +1281,7 @@ void TextValueEditor::findWordLists() { ...@@ -1279,6 +1281,7 @@ void TextValueEditor::findWordLists() {
} }
void TextValueEditor::clearWordListIndicators(RotatedDC& dc) { void TextValueEditor::clearWordListIndicators(RotatedDC& dc) {
if (word_lists.empty()) return;
Rotater rot(dc, style().getRotation()); Rotater rot(dc, style().getRotation());
bool current = isCurrent(); bool current = isCurrent();
FOR_EACH(wl, word_lists) { FOR_EACH(wl, word_lists) {
...@@ -1301,6 +1304,7 @@ void TextValueEditor::redrawWordListIndicators(bool toggling_dropdown) { ...@@ -1301,6 +1304,7 @@ void TextValueEditor::redrawWordListIndicators(bool toggling_dropdown) {
} }
void TextValueEditor::drawWordListIndicators(RotatedDC& dc, bool redrawing) { void TextValueEditor::drawWordListIndicators(RotatedDC& dc, bool redrawing) {
if (word_lists.empty()) return;
Rotater rot(dc, style().getRotation()); Rotater rot(dc, style().getRotation());
bool current = isCurrent(); bool current = isCurrent();
// Draw lines around fields // Draw lines around fields
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment