aboutsummaryrefslogtreecommitdiff
path: root/src/game_tab/right_panel
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2023-01-16 14:55:48 +0100
committerLoic Guegan <manzerbredes@mailbox.org>2023-01-16 14:55:48 +0100
commit3b11b9d4f3eee5faa656d7ee61077e80726bdc36 (patch)
tree7817c036843c18eac0012298ec7808d795411f58 /src/game_tab/right_panel
parentb7667d1d40045ecd840b9b192c2740e5f83e7eba (diff)
Improve openings database code
Diffstat (limited to 'src/game_tab/right_panel')
-rw-r--r--src/game_tab/right_panel/GameTabRightPanel.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/game_tab/right_panel/GameTabRightPanel.cpp b/src/game_tab/right_panel/GameTabRightPanel.cpp
index 29f91b7..21b4ed7 100644
--- a/src/game_tab/right_panel/GameTabRightPanel.cpp
+++ b/src/game_tab/right_panel/GameTabRightPanel.cpp
@@ -11,7 +11,7 @@ GameTabRightPanel::GameTabRightPanel(wxFrame *parent, std::shared_ptr<Game> game
tags_list->InsertColumn(1, L"Value", wxLIST_FORMAT_LEFT, 500);
tagTextCtrl->SetHint("Tag");
valueTextCtrl->SetHint("Value");
-
+ opening_label->SetHint("Current opening");
RefreshTagsList();
// Bind events
@@ -42,6 +42,7 @@ GameTabRightPanel::GameTabRightPanel(wxFrame *parent, std::shared_ptr<Game> game
Bind(wxEVT_KEY_UP, [p=this](wxKeyEvent &e){e.ResumePropagation(1);e.Skip();});
ApplyPreferences();
+ analyze_game_button->Disable();
}
void GameTabRightPanel::OnLiveAnalysis(wxCommandEvent &event) {
@@ -156,6 +157,11 @@ void GameTabRightPanel::Notify() {
if (live_engine != nullptr) {
live_engine->SetFEN(game->GetFen());
}
+ // Update opening name
+ std::string opening,eco;
+ game->GetOpening(opening,eco);
+ if(eco.size()>0)
+ opening_label->SetValue(eco+": "+opening);
}
void GameTabRightPanel::ApplyPreferences() {