mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-09 20:47:00 -04:00
Selection highlight debug for linux
this is not optimized but it'll do for now
This commit is contained in:
+11
-3
@@ -665,12 +665,13 @@ 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) {
|
||||||
// Hide caret
|
// Hide caret
|
||||||
if (isCurrent()) {
|
if (isCurrent()) {
|
||||||
wxCaret* caret = editor().GetCaret();
|
wxCaret* caret = editor().GetCaret();
|
||||||
if (caret->IsVisible()) caret->Hide();
|
if (caret->IsVisible()) caret->Hide();
|
||||||
}
|
}
|
||||||
|
#ifdef __WXMSW__
|
||||||
// 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
|
||||||
@@ -701,7 +702,14 @@ void TextValueEditor::redrawSelection(size_t old_selection_start_i, size_t old_s
|
|||||||
// redraw drop down indicators
|
// redraw drop down indicators
|
||||||
drawWordListIndicators(dc, true);
|
drawWordListIndicators(dc, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
scroll_with_cursor = true;
|
||||||
|
if (ensureCaretVisible()) {
|
||||||
|
updateScrollbar();
|
||||||
|
}
|
||||||
|
redraw();
|
||||||
|
#endif
|
||||||
if (isCurrent()) {
|
if (isCurrent()) {
|
||||||
showCaret();
|
showCaret();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user