aboutsummaryrefslogtreecommitdiff
path: root/src/game_tab
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2022-02-23 18:47:18 +0100
committerLoic Guegan <manzerbredes@mailbox.org>2022-02-23 18:47:18 +0100
commita3c24f27f081e49b9a814aba61d298f1d0a5d0fa (patch)
tree668fbefe38925fe750fee3323f03f8d42d2215f5 /src/game_tab
parentce941c146aea7925bded6b9d2a0d0559d3156ad3 (diff)
Debug PGN import
Diffstat (limited to 'src/game_tab')
-rw-r--r--src/game_tab/Game.cpp6
-rw-r--r--src/game_tab/Game.hpp2
-rw-r--r--src/game_tab/editor/EditorPanel.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/game_tab/Game.cpp b/src/game_tab/Game.cpp
index ad712bb..b9181a9 100644
--- a/src/game_tab/Game.cpp
+++ b/src/game_tab/Game.cpp
@@ -15,10 +15,10 @@ Game::Game(std::string fen) : current(NULL), moves(NULL) {
board = chessarbiter::FENParser::Parse(fen).board;
}
-Game::Game(HalfMove *m) {
+Game::Game(HalfMove *m, std::string initial_fen) {
moves = m;
current = m;
- initial_fen = m->GetFen();
+ this->initial_fen = initial_fen;
board = chessarbiter::FENParser::Parse(initial_fen).board;
}
@@ -91,7 +91,7 @@ bool Game::Play(std::string move) {
if (moves == NULL) {
moves = m;
}
- wxLogDebug("%s",GetPGN());
+ wxLogDebug("%s", GetPGN());
return (true);
}
return (false);
diff --git a/src/game_tab/Game.hpp b/src/game_tab/Game.hpp
index 790d18c..7cad269 100644
--- a/src/game_tab/Game.hpp
+++ b/src/game_tab/Game.hpp
@@ -16,7 +16,7 @@ class Game {
public:
Game();
Game(std::string fen);
- Game(HalfMove *m);
+ Game(HalfMove *m, std::string initial_fen);
std::string GetBoard();
std::string GetTag(std::string tagname);
diff --git a/src/game_tab/editor/EditorPanel.cpp b/src/game_tab/editor/EditorPanel.cpp
index 7abe09a..ffc5499 100644
--- a/src/game_tab/editor/EditorPanel.cpp
+++ b/src/game_tab/editor/EditorPanel.cpp
@@ -48,7 +48,7 @@ EditorPanel::EditorPanel(wxFrame *parent, Game *game)
tag_panel_sizer->Add(tag_edit_panel, 0, wxEXPAND);
tags_list = new wxListCtrl(tag_panel, wxID_ANY, wxDefaultPosition,
wxDefaultSize, wxLC_REPORT);
- tags_list->InsertColumn(0, L"Name");
+ tags_list->InsertColumn(0, L"Name", wxLIST_FORMAT_LEFT, 200);
tags_list->InsertColumn(1, L"Value", wxLIST_FORMAT_LEFT, 500);
RefreshTagsList();
tag_panel_sizer->Add(tags_list, 1, wxEXPAND);