mirror of
https://gitlab.com/manzerbredes/ochess.git
synced 2025-04-07 02:26:29 +02:00
Debug comments
This commit is contained in:
parent
d1c1031332
commit
042f6ca170
2 changed files with 8 additions and 1 deletions
|
@ -89,7 +89,12 @@ void GameTabRightPanel::OnCommentChange(wxCommandEvent &event) {
|
||||||
wxLogDebug("GameTabRightPanel: comment input change");
|
wxLogDebug("GameTabRightPanel: comment input change");
|
||||||
HalfMove *m = game->GetCurrentMove();
|
HalfMove *m = game->GetCurrentMove();
|
||||||
if (m != nullptr) {
|
if (m != nullptr) {
|
||||||
m->comment=event.GetString().ToStdString();
|
m->comment=event.GetString().Trim().ToStdString();
|
||||||
|
// Remove newlines:
|
||||||
|
for(char &c:m->comment){
|
||||||
|
if(c=='\n')
|
||||||
|
c=' ';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
editor_canvas->Refresh();
|
editor_canvas->Refresh();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
#include "../Game.hpp"
|
#include "../Game.hpp"
|
||||||
#include "LiveEngineDialog.hpp"
|
#include "LiveEngineDialog.hpp"
|
||||||
#include "editor/EditorCanvas.hpp"
|
#include "editor/EditorCanvas.hpp"
|
||||||
|
|
Loading…
Add table
Reference in a new issue