Commit e4ecdc279593310145a3123a14b64cf01874049f
1 parent
54060d37
Exists in
master
and in
6 other branches
ENH: Default open directory dir for win32
Showing
1 changed file
with
8 additions
and
1 deletions
Show diff stats
invesalius/gui/task_importer.py
... | ... | @@ -17,10 +17,13 @@ |
17 | 17 | # detalhes. |
18 | 18 | #-------------------------------------------------------------------------- |
19 | 19 | import os |
20 | +import sys | |
21 | + | |
20 | 22 | import wx |
21 | 23 | import wx.lib.hyperlink as hl |
22 | 24 | import wx.lib.platebtn as pbtn |
23 | 25 | import wx.lib.pubsub as ps |
26 | + | |
24 | 27 | import constants as const |
25 | 28 | |
26 | 29 | BTN_IMPORT_LOCAL = wx.NewId() |
... | ... | @@ -166,8 +169,12 @@ class InnerTaskPanel(wx.Panel): |
166 | 169 | if proj_name: |
167 | 170 | print "TODO: Send Signal - Open project "+ proj_name |
168 | 171 | else: |
172 | + if sys.platform == 'win32': | |
173 | + path = "" | |
174 | + else: | |
175 | + path = os.getcwd() | |
169 | 176 | dlg = wx.FileDialog(self, message="Open project...", |
170 | - defaultDir=os.getcwd(), | |
177 | + defaultDir=path, | |
171 | 178 | defaultFile="", wildcard=WILDCARD_OPEN, |
172 | 179 | style=wx.OPEN|wx.CHANGE_DIR) |
173 | 180 | dlg.SetFilterIndex(3) | ... | ... |