Skip to content

Commit 5bc324c

Browse files
committed
Remove vestigial undo/redo from GUI, including (now inactive) icons from toolbar
1 parent 32c0a97 commit 5bc324c

5 files changed

Lines changed: 4 additions & 80 deletions

File tree

Makefile.am

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ EXTRA_DIST = \
8585
src/gui/bitmaps/prev.xpm \
8686
src/gui/bitmaps/print.xpm \
8787
src/gui/bitmaps/profiles.xpm \
88-
src/gui/bitmaps/redo.xpm \
8988
src/gui/bitmaps/saveas.xpm \
9089
src/gui/bitmaps/savedata.xpm \
9190
src/gui/bitmaps/save.xpm \
@@ -94,7 +93,6 @@ EXTRA_DIST = \
9493
src/gui/bitmaps/tobegin.xpm \
9594
src/gui/bitmaps/toend.xpm \
9695
src/gui/bitmaps/tree.xpm \
97-
src/gui/bitmaps/undo.xpm \
9896
src/gui/bitmaps/zoomfit.xpm \
9997
src/gui/bitmaps/zoomin.xpm \
10098
src/gui/bitmaps/zoomout.xpm \

src/gui/bitmaps/Makefile.am

Lines changed: 0 additions & 57 deletions
This file was deleted.

src/gui/gamedoc.cc

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#include <fstream>
2525

2626
#include <wx/wxprec.h>
27-
#include <wx/filename.h> // used to create temp files for undo/redo
2827

2928
#include "gambit.h"
3029
#include "core/tinyxml.h" // for XML parser for LoadDocument()
@@ -111,7 +110,7 @@ GameDocument::GameDocument(Game p_game)
111110

112111
GameDocument::~GameDocument() { wxGetApp().RemoveDocument(this); }
113112

114-
bool GameDocument::LoadDocument(const wxString &p_filename, bool p_saveUndo)
113+
bool GameDocument::LoadDocument(const wxString &p_filename)
115114
{
116115
TiXmlDocument doc((const char *)p_filename.mb_str());
117116
if (!doc.LoadFile()) {
@@ -218,11 +217,6 @@ bool GameDocument::LoadDocument(const wxString &p_filename, bool p_saveUndo)
218217
m_style.SetNumDecimals(numDecimals);
219218
}
220219

221-
if (p_saveUndo) {
222-
std::ostringstream s;
223-
SaveDocument(s);
224-
}
225-
226220
return true;
227221
}
228222

src/gui/gamedoc.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,10 @@ class StrategyDominanceStack {
120120
// principle, be kept -- but they may no longer be Nash, etc.
121121
//
122122
// GBT_DOC_MODIFIED_LABELS: Labeling of players, strategies, etc. has
123-
// changed. These have no effect on the game mathematically, so computed
124-
// data may be kept; but, we want to track the label change for undo, etc.
123+
// changed.
125124
//
126125
// GBT_DOC_MODIFIED_VIEWS: Information about how the document is viewed
127-
// (e.g., player colors) has changed. We want to track this for undo,
128-
// but, again, this has no effect on the game mathematically.
126+
// (e.g., player colors) has changed.
129127
//
130128
using GameModificationType = enum {
131129
GBT_DOC_MODIFIED_NONE = 0x00,
@@ -173,7 +171,7 @@ class GameDocument {
173171
//@{
174172
/// Load document from the specified file (which should be a .gbt file)
175173
/// Returns true if successful, false if error
176-
bool LoadDocument(const wxString &p_filename, bool p_saveUndo = true);
174+
bool LoadDocument(const wxString &p_filename);
177175
void SaveDocument(std::ostream &) const;
178176
//@}
179177

src/gui/gameframe.cc

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -364,11 +364,9 @@ void GameFrame::OnUpdate()
364364
#include "bitmaps/preview.xpm"
365365
#include "bitmaps/print.xpm"
366366
#include "bitmaps/profiles.xpm"
367-
#include "bitmaps/redo.xpm"
368367
#include "bitmaps/save.xpm"
369368
#include "bitmaps/saveas.xpm"
370369
#include "bitmaps/table.xpm"
371-
#include "bitmaps/undo.xpm"
372370
#include "bitmaps/zoomfit.xpm"
373371
#include "bitmaps/zoomin.xpm"
374372
#include "bitmaps/zoomout.xpm"
@@ -560,13 +558,6 @@ void GameFrame::MakeToolbar()
560558

561559
toolBar->AddSeparator();
562560

563-
toolBar->AddTool(wxID_UNDO, wxEmptyString, wxBitmap(undo_xpm), wxNullBitmap, wxITEM_NORMAL,
564-
_("Undo the last action"), _("Undo the last change to the game"), nullptr);
565-
toolBar->AddTool(wxID_REDO, wxEmptyString, wxBitmap(redo_xpm), wxNullBitmap, wxITEM_NORMAL,
566-
_("Redo the undone action"), _("Redo the last undone change"), nullptr);
567-
568-
toolBar->AddSeparator();
569-
570561
toolBar->AddTool(GBT_MENU_EDIT_NEWPLAYER, wxEmptyString, wxBitmap(newplayer_xpm), wxNullBitmap,
571562
wxITEM_NORMAL, _("Add a new player"), _("Add a new player to the game"),
572563
nullptr);

0 commit comments

Comments
 (0)