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,10 +17,13 @@ | ||
17 | # detalhes. | 17 | # detalhes. |
18 | #-------------------------------------------------------------------------- | 18 | #-------------------------------------------------------------------------- |
19 | import os | 19 | import os |
20 | +import sys | ||
21 | + | ||
20 | import wx | 22 | import wx |
21 | import wx.lib.hyperlink as hl | 23 | import wx.lib.hyperlink as hl |
22 | import wx.lib.platebtn as pbtn | 24 | import wx.lib.platebtn as pbtn |
23 | import wx.lib.pubsub as ps | 25 | import wx.lib.pubsub as ps |
26 | + | ||
24 | import constants as const | 27 | import constants as const |
25 | 28 | ||
26 | BTN_IMPORT_LOCAL = wx.NewId() | 29 | BTN_IMPORT_LOCAL = wx.NewId() |
@@ -166,8 +169,12 @@ class InnerTaskPanel(wx.Panel): | @@ -166,8 +169,12 @@ class InnerTaskPanel(wx.Panel): | ||
166 | if proj_name: | 169 | if proj_name: |
167 | print "TODO: Send Signal - Open project "+ proj_name | 170 | print "TODO: Send Signal - Open project "+ proj_name |
168 | else: | 171 | else: |
172 | + if sys.platform == 'win32': | ||
173 | + path = "" | ||
174 | + else: | ||
175 | + path = os.getcwd() | ||
169 | dlg = wx.FileDialog(self, message="Open project...", | 176 | dlg = wx.FileDialog(self, message="Open project...", |
170 | - defaultDir=os.getcwd(), | 177 | + defaultDir=path, |
171 | defaultFile="", wildcard=WILDCARD_OPEN, | 178 | defaultFile="", wildcard=WILDCARD_OPEN, |
172 | style=wx.OPEN|wx.CHANGE_DIR) | 179 | style=wx.OPEN|wx.CHANGE_DIR) |
173 | dlg.SetFilterIndex(3) | 180 | dlg.SetFilterIndex(3) |