diff options
Diffstat (limited to 'src/game_tab/right_panel/GameTabRightPanel.cpp')
| -rw-r--r-- | src/game_tab/right_panel/GameTabRightPanel.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/game_tab/right_panel/GameTabRightPanel.cpp b/src/game_tab/right_panel/GameTabRightPanel.cpp index f421228..29f91b7 100644 --- a/src/game_tab/right_panel/GameTabRightPanel.cpp +++ b/src/game_tab/right_panel/GameTabRightPanel.cpp @@ -1,11 +1,6 @@ #include "GameTabRightPanel.hpp" -wxDEFINE_EVENT(GOTO_MOVE_EVENT, wxCommandEvent); -wxDEFINE_EVENT(DELETE_MOVE_EVENT, wxCommandEvent); -wxDEFINE_EVENT(PROMOTE_MOVE_EVENT, wxCommandEvent); -wxDEFINE_EVENT(SET_AS_MAINLINE_EVENT, wxCommandEvent); -wxDEFINE_EVENT(PREVIOUS_MOVE_EVENT, wxCommandEvent); -wxDEFINE_EVENT(NEXT_MOVE_EVENT, wxCommandEvent); +wxDEFINE_EVENT(LIVE_ANALYSIS_STATUS, wxCommandEvent); GameTabRightPanel::GameTabRightPanel(wxFrame *parent, std::shared_ptr<Game> game) : TabGameRightPanel(parent), game(game), selected_item(-1), @@ -53,6 +48,12 @@ void GameTabRightPanel::OnLiveAnalysis(wxCommandEvent &event) { if (live_engine == nullptr) { int selection = engine_list->GetSelection(); if (selection != wxNOT_FOUND) { + // Notify about the state of the LiveEngine + wxCommandEvent notifyEvent(LIVE_ANALYSIS_STATUS,GetId()); + notifyEvent.SetEventObject(this); + notifyEvent.SetInt(1); + ProcessEvent(notifyEvent); + live_engine = new LiveEngineDialog( this, engine_list->GetString(selection).ToStdString()); live_engine->SetFEN(game->GetFen()); @@ -87,6 +88,12 @@ void GameTabRightPanel::OnTagDeselected(wxListEvent &event) { } void GameTabRightPanel::OnLiveEngineClose(wxCloseEvent &e) { + // Notify about the state of the LiveEngine + wxCommandEvent notifyEvent(LIVE_ANALYSIS_STATUS,GetId()); + notifyEvent.SetEventObject(this); + notifyEvent.SetInt(0); + ProcessEvent(notifyEvent); + // Refresh pointer live_engine = nullptr; e.Skip(); } |
