1. Chaiwat Suttipongsakul
  2. boa-constructor

Commits

hathawsh  committed 6bba244

Don't choke if directory doesn't exist on opening the dialog, and keep the window size even if the user pushes cancel.

  • Participants
  • Parent commits 50dc77b
  • Branches default

Comments (0)

Files changed (1)

File FileDlg.py

View file
  • Ignore whitespace
 
     def OnBtcancelButton(self, event):
         self.editorFilterNode.setFilter(self.editorFilter)
+        wxBoaFileDialog._lastSize = self.GetClientSize()
         self.EndModal(wxID_CANCEL)
 
     def OnTcfilenameTextEnter(self, event):
         prot, cat, res, uri = Explorer.splitURI(os.path.join(newDir,'dummy.tmp'))
         res = os.path.dirname(res)
         node = Explorer.getTransport(prot, cat, res, self.transports)
-        assert node, 'Sorry, transport could not be opened'
+        if not node:
+            wxMessageBox('Could not open %s' % newDir,
+                'Warning', wxOK | wxICON_EXCLAMATION | wxCENTRE)
+            node = self.transports
 
         node.allowedProtocols = ['file', 'zip']
         self.lcFiles.setLocalFilter(localfilter)