diff options
Diffstat (limited to 'src/game_tab/right_panel')
| -rw-r--r-- | src/game_tab/right_panel/GameTabRightPanel.cpp | 8 |
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() { |
