aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO.md1
-rw-r--r--src/game_tab/right_panel/editor/EditorCanvas.cpp7
2 files changed, 7 insertions, 1 deletions
diff --git a/TODO.md b/TODO.md
index f5815fe..fd9b7db 100644
--- a/TODO.md
+++ b/TODO.md
@@ -16,6 +16,7 @@
- [x] Update PGNP to last commit
- [x] Remove duplicated variations (currently if variation is played more than once it is added anyway to the move list)
- [ ] Debug the Preference window on OS X (GetIcon() must be overridden)
+ - [ ] When MainWindow is resized, the chess move editor scroll get broken if it was in used(It is not related to CGEditor, looks like some resize events are not properly handled)
- [ ] When OChess preferences are changed, they are not applied on the openned tabs (only on OS X)
## Additional Features
diff --git a/src/game_tab/right_panel/editor/EditorCanvas.cpp b/src/game_tab/right_panel/editor/EditorCanvas.cpp
index ab56a8c..3120177 100644
--- a/src/game_tab/right_panel/editor/EditorCanvas.cpp
+++ b/src/game_tab/right_panel/editor/EditorCanvas.cpp
@@ -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(){