aboutsummaryrefslogtreecommitdiff
path: root/src/game_tab/right_panel/GameTabRightPanel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game_tab/right_panel/GameTabRightPanel.cpp')
-rw-r--r--src/game_tab/right_panel/GameTabRightPanel.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/game_tab/right_panel/GameTabRightPanel.cpp b/src/game_tab/right_panel/GameTabRightPanel.cpp
index 9bdc29c..1b53c83 100644
--- a/src/game_tab/right_panel/GameTabRightPanel.cpp
+++ b/src/game_tab/right_panel/GameTabRightPanel.cpp
@@ -9,7 +9,7 @@ wxDEFINE_EVENT(NEXT_MOVE_EVENT, wxCommandEvent);
GameTabRightPanel::GameTabRightPanel(wxFrame *parent, std::shared_ptr<Game> game)
: TabGameRightPanel(parent), game(game), selected_item(-1),
- live_engine(NULL) {
+ live_engine(nullptr) {
editor_canvas = new EditorCanvas((wxFrame *)editor_page);
editor_canvas_sizer->Add(editor_canvas, 1, wxEXPAND);
tags_list->InsertColumn(0, L"Name", wxLIST_FORMAT_LEFT, 200);
@@ -42,7 +42,7 @@ GameTabRightPanel::GameTabRightPanel(wxFrame *parent, std::shared_ptr<Game> game
LIVE_ANALYSIS_GAME_BUTTON);
nag_panel->Bind(wxEVT_BUTTON, [p=this](wxCommandEvent &e){
HalfMove *m = p->game->GetCurrentMove();
- if (m != NULL) {
+ if (m != nullptr) {
m->nag=p->GetNagFromStr(((wxButton*)e.GetEventObject())->GetLabel().ToStdString());
p->editor_canvas->Refresh();
}
@@ -60,7 +60,7 @@ GameTabRightPanel::GameTabRightPanel(wxFrame *parent, std::shared_ptr<Game> game
}
void GameTabRightPanel::OnLiveAnalysis(wxCommandEvent &event) {
- if (live_engine == NULL) {
+ if (live_engine == nullptr) {
int selection = engine_list->GetSelection();
if (selection != wxNOT_FOUND) {
live_engine = new LiveEngineDialog(
@@ -97,14 +97,14 @@ void GameTabRightPanel::NotifyBoard() {
}
void GameTabRightPanel::OnLiveEngineClose(wxCloseEvent &e) {
- live_engine = NULL;
+ live_engine = nullptr;
e.Skip();
}
void GameTabRightPanel::OnCommentChange(wxCommandEvent &event) {
wxLogDebug("GameTabRightPanel: comment input change");
HalfMove *m = game->GetCurrentMove();
- if (m != NULL) {
+ if (m != nullptr) {
m->comment=event.GetString().ToStdString();
}
editor_canvas->Refresh();
@@ -172,13 +172,13 @@ void GameTabRightPanel::OnMoveSetAsMainline(wxCommandEvent &event) {
void GameTabRightPanel::Notify() {
HalfMove *m = game->GetCurrentMove();
- if (m != NULL) {
+ if (m != nullptr) {
comment_input->ChangeValue(
m->comment); // ChangeValue do not raise events
}
editor_canvas->SetMoves(game->GetMoves(), m);
// Put it here for now:
- if (live_engine != NULL) {
+ if (live_engine != nullptr) {
live_engine->SetFEN(game->GetFen());
}
}