From fcf4fcc18c1d51020e49604cf48044a224357583 Mon Sep 17 00:00:00 2001 From: Thiago Franco de Moraes Date: Tue, 28 Mar 2017 10:12:07 -0300 Subject: [PATCH] Changed the import button icon and added a tooltip --- invesalius/gui/data_notebook.py | 5 ++--- invesalius/gui/dialogs.py | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/invesalius/gui/data_notebook.py b/invesalius/gui/data_notebook.py index 7a0d28a..2cda904 100644 --- a/invesalius/gui/data_notebook.py +++ b/invesalius/gui/data_notebook.py @@ -593,9 +593,7 @@ class SurfaceButtonControlPanel(wx.Panel): wx.BITMAP_TYPE_PNG) BMP_DUPLICATE = wx.Bitmap(os.path.join(const.ICON_DIR, "data_duplicate.png"), wx.BITMAP_TYPE_PNG) - - BMP_OPEN = wx.Bitmap(os.path.join(const.ICON_DIR, "data_duplicate.png"), - wx.BITMAP_TYPE_PNG) + BMP_OPEN = wx.ArtProvider.GetBitmap(wx.ART_FOLDER_OPEN, wx.ART_BUTTON, (18,18)) # Plate buttons based on previous bitmaps button_style = pbtn.PB_STYLE_SQUARE | pbtn.PB_STYLE_DEFAULT @@ -615,6 +613,7 @@ class SurfaceButtonControlPanel(wx.Panel): BMP_OPEN, style=button_style, size = wx.Size(24, 20)) + button_open.SetToolTipString(_("Import a surface file into InVesalius")) # Add all controls to gui sizer = wx.BoxSizer(wx.HORIZONTAL) diff --git a/invesalius/gui/dialogs.py b/invesalius/gui/dialogs.py index ac750ae..3017e40 100644 --- a/invesalius/gui/dialogs.py +++ b/invesalius/gui/dialogs.py @@ -386,8 +386,7 @@ def ShowImportMeshFilesDialog(): # Default system path current_dir = os.path.abspath(".") dlg = wx.FileDialog(None, message=_("Import surface file"), - defaultDir="", - defaultFile="", wildcard=WILDCARD_MESH_FILES, + wildcard=WILDCARD_MESH_FILES, style=wx.FD_OPEN | wx.FD_CHANGE_DIR) # stl filter is default -- libgit2 0.21.2