From 2206780fc617a55247a7fc9d7e6a72c6a16a12aa Mon Sep 17 00:00:00 2001 From: cncfanatics Date: Thu, 12 Aug 2010 18:06:01 +0200 Subject: [PATCH] Add undo and redo buttons in toolbar. Move undelete to the fit instead of edit menu --- gui/mainMenuBar.py | 2 +- gui/mainToolBar.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gui/mainMenuBar.py b/gui/mainMenuBar.py index 90603bd0e..43d21e921 100644 --- a/gui/mainMenuBar.py +++ b/gui/mainMenuBar.py @@ -36,7 +36,6 @@ class MainMenuBar(wx.MenuBar): editMenu.Append(wx.ID_UNDO) editMenu.Append(wx.ID_REDO) - editMenu.Append(wx.ID_UNDELETE) # Fit menu fitMenu = wx.Menu() @@ -47,6 +46,7 @@ class MainMenuBar(wx.MenuBar): fitMenu.Append(wx.ID_EDIT, "&Rename", "Rename this fit.") fitMenu.Append(wx.ID_COPY) fitMenu.Append(wx.ID_DELETE) + fitMenu.Append(wx.ID_UNDELETE) fitMenu.AppendSeparator() fitMenu.Append(wx.ID_OPEN, "&Import", "Import a fit into pyfa.") fitMenu.Append(wx.ID_SAVEAS, "&Export", "Export the fit to another format.") diff --git a/gui/mainToolBar.py b/gui/mainToolBar.py index efda17fa7..c6c67de09 100644 --- a/gui/mainToolBar.py +++ b/gui/mainToolBar.py @@ -31,7 +31,12 @@ class MainToolBar(wx.ToolBar): self.AddLabelTool(wx.ID_OPEN, "Import fit", wx.ArtProvider.GetBitmap(wx.ART_FILE_OPEN, wx.ART_TOOLBAR)) self.AddLabelTool(wx.ID_SAVEAS, "Export fit", wx.ArtProvider.GetBitmap(wx.ART_FILE_SAVE_AS, wx.ART_TOOLBAR)) + self.AddSeparator() + self.AddLabelTool(wx.ID_UNDO, "Undo last action", wx.ArtProvider.GetBitmap(wx.ART_UNDO, wx.ART_TOOLBAR)) + self.AddLabelTool(wx.ID_REDO, "Redo last action", wx.ArtProvider.GetBitmap(wx.ART_REDO, wx.ART_TOOLBAR)) + self.AddSeparator() self.AddLabelTool(wx.ID_ANY, "Ship Browser", bitmapLoader.getBitmap("ship_big")) self.AddLabelTool(wx.ID_ANY, "Character Editor", bitmapLoader.getBitmap("character_big")) + self.Realize()