Commit a405dc1c authored by Markus Koschany's avatar Markus Koschany

Remove undo.patch again. Currently it doesn't work as expected.

parent 1f0bff71
......@@ -9,8 +9,6 @@ brutalchess (0.5.2+dfsg-8) unstable; urgency=medium
* Move the package to salsa.debian.org.
* Use pkg-config instead of freetype-config.
Thanks to Reiner Herrmann for the patch. (Closes: #892337)
* Bill Allombert: Implement an undo feature to undo the last move.
Thanks to Bill Allombert for the report and patch. (Closes: #845269)
-- Markus Koschany <apo@debian.org> Sat, 20 Oct 2018 18:57:34 +0200
......
......@@ -6,4 +6,3 @@
06_gcc-4.7.patch
disable-quake-pieces.patch
use-pkg-config.patch
undo.patch
Index: brutalchess-0.5.2+dfsg/src/gamecore.cpp
===================================================================
--- brutalchess-0.5.2+dfsg.orig/src/gamecore.cpp
+++ brutalchess-0.5.2+dfsg/src/gamecore.cpp
@@ -349,6 +349,14 @@ bool GameCore::handleEvent(SDL_Event& e)
m_menu.activate();
}
}
+ if (e.key.keysym.sym == SDLK_BACKSPACE) {
+ if(m_firstclick.isValid()) {
+ SDL_SetCursor(m_defaultcur);
+ m_set->deselectPosition();
+ m_firstclick.invalidate();
+ }
+ m_game.undoMove();
+ }
}
else if (e.type == SDL_USEREVENT) {
if(e.user.code == 0) {
Index: brutalchess-0.5.2+dfsg/src/chessgame.cpp
===================================================================
--- brutalchess-0.5.2+dfsg.orig/src/chessgame.cpp
+++ brutalchess-0.5.2+dfsg/src/chessgame.cpp
@@ -80,9 +80,9 @@ void ChessGame::undoMove()
m_state = m_history_stack.top();
m_redo_stack.push(m_history_stack.top());
m_history_stack.pop();
+ m_player1->undoMove();
+ m_player2->undoMove();
}
- m_player1->undoMove();
- m_player2->undoMove();
}
// End of file chessgame.cpp
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment