Skip to content

Commit

Permalink
Use stock window ID for Undo
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiolo committed Aug 6, 2024
1 parent 3137fd5 commit 3fd3a9c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/document.h
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,7 @@ struct Document {
ClearSelectionRefresh();
return _(L"Evaluation finished.");

case A_UNDO:
case wxID_UNDO:
if (undolist.size()) {
Undo(dc, undolist, redolist);
return nullptr;
Expand Down
1 change: 0 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ enum {
A_SAVEALL = 500,
A_COLLAPSE,
A_NEWGRID,
A_UNDO,
A_ABOUT,
A_RUN,
A_CLRVIEW,
Expand Down
4 changes: 2 additions & 2 deletions src/myframe.h
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ struct MyFrame : wxFrame {
_(L"only sets the colors and style of the copied cell, and keeps the text"));
MyAppend(editmenu, A_COLLAPSE, _(L"Collapse Ce&lls\tCTRL+l"));
editmenu->AppendSeparator();
MyAppend(editmenu, A_UNDO, _(L"&Undo\tCTRL+z"),
MyAppend(editmenu, wxID_UNDO, _(L"&Undo\tCTRL+z"),
_(L"revert the changes, one step at a time"));
MyAppend(editmenu, A_REDO, _(L"&Redo\tCTRL+y"),
_(L"redo any undo steps, if you haven't made changes since"));
Expand Down Expand Up @@ -649,7 +649,7 @@ struct MyFrame : wxFrame {
AddTBIcon(_(L"Save (CTRL+s)"), wxID_SAVE, iconpath + L"filesave.svg");
AddTBIcon(_(L"Save As"), wxID_SAVEAS, iconpath + L"filesaveas.svg");
SEPARATOR;
AddTBIcon(_(L"Undo (CTRL+z)"), A_UNDO, iconpath + L"undo.svg");
AddTBIcon(_(L"Undo (CTRL+z)"), wxID_UNDO, iconpath + L"undo.svg");
AddTBIcon(_(L"Copy (CTRL+c)"), wxID_COPY, iconpath + L"editcopy.svg");
AddTBIcon(_(L"Paste (CTRL+v)"), wxID_PASTE, iconpath + L"editpaste.svg");
SEPARATOR;
Expand Down

0 comments on commit 3fd3a9c

Please sign in to comment.