Improve UI

This commit is contained in:
Loic Guegan 2023-06-05 18:55:14 +02:00
parent 4a9523f9df
commit 7ea1e6dc2a
2 changed files with 7 additions and 1 deletions

View file

@ -183,8 +183,13 @@ void EditorCanvas::MouseEvent(wxMouseEvent &event) {
void EditorCanvas::SetMoves(HalfMove *moves, HalfMove *current) {
CGEditor::status.Moves = moves;
CGEditor::status.CurrentMove = current;
Refresh();
// Focus on current move:
if(current!=nullptr){
Update(); // Wait for preview call to Refresh() to finish (otherwise heisenbugs)
CGEditor::FocusOnMove(current);
Refresh();
}
}
void EditorCanvas::ApplyPreferences(){