From a2448ccf54d19f3501ccbd0ef021d39c99ea64b1 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Wed, 7 Jun 2023 09:24:25 +0200 Subject: [PATCH 1/3] Debug CGEditor --- CMakeLists.txt | 2 +- libs/cgeditor | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 253e6a9..dd5f6df 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.10) -project(ochess VERSION 0.0.0) +project(ochess VERSION 0.0.4) # Configure CXX Standards set(CMAKE_CXX_STANDARD 17) diff --git a/libs/cgeditor b/libs/cgeditor index e9bcc71..5ceb3ea 160000 --- a/libs/cgeditor +++ b/libs/cgeditor @@ -1 +1 @@ -Subproject commit e9bcc710ff40cd257de242a2ff3b68feb7b68cac +Subproject commit 5ceb3eafc405859f5e588118158cb9e9dbd00485 From 20df3fce6bf558aa5a1a144ed63f092462fcbdb4 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Wed, 7 Jun 2023 11:22:16 +0200 Subject: [PATCH 2/3] Changes todos --- TODO.md | 1 + 1 file changed, 1 insertion(+) diff --git a/TODO.md b/TODO.md index 45aee82..70ba8cc 100644 --- a/TODO.md +++ b/TODO.md @@ -18,6 +18,7 @@ - [ ] Debug the Preference window on OS X (GetIcon() must be overridden) - [x] When MainWindow is resized, the chess move editor scroll get broken if it was in used(It is related to CGEditor, on canvas resize, ScrollX/ScrollY is not updated properly, thus item can become unreachable) - [ ] When OChess preferences are changed, they are not applied on the openned tabs (only on OS X) + - [ ] In CGEditor, when moves are deleted, scroll mus be resets otherwise bugs (sounds like a reset scroll method in the Scrollbar should do the trick) ## Additional Features - [x] Add a live evaluation bar to the BoardCanvas From f7dda9c006e0f68277ae96d8f37e9ff14a271cd4 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Wed, 7 Jun 2023 19:24:43 +0200 Subject: [PATCH 3/3] Upgrade CGEditor --- libs/cgeditor | 2 +- src/game_tab/right_panel/editor/EditorCanvas.cpp | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/libs/cgeditor b/libs/cgeditor index 5ceb3ea..7d753ae 160000 --- a/libs/cgeditor +++ b/libs/cgeditor @@ -1 +1 @@ -Subproject commit 5ceb3eafc405859f5e588118158cb9e9dbd00485 +Subproject commit 7d753ae2d82592e09e04e4ecf11df976a2d187fd diff --git a/src/game_tab/right_panel/editor/EditorCanvas.cpp b/src/game_tab/right_panel/editor/EditorCanvas.cpp index 3120177..a651ba5 100644 --- a/src/game_tab/right_panel/editor/EditorCanvas.cpp +++ b/src/game_tab/right_panel/editor/EditorCanvas.cpp @@ -183,13 +183,11 @@ 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(); } + Refresh(); } void EditorCanvas::ApplyPreferences(){