Skip to content

Commit

Permalink
Fix opening files.
Browse files Browse the repository at this point in the history
  • Loading branch information
krischer committed Apr 17, 2020
1 parent e473daa commit b95aaff
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions asdf_sextant/main.py
Expand Up @@ -755,22 +755,20 @@ def on_select_file_button_released(self):
"""
Fill the station tree widget upon opening a new file.
"""
filename = str(
QtGui.QFileDialog.getOpenFileName(
parent=self,
caption="Choose File",
directory=self._state["file_open_dir"],
filter="ASDF files (*.h5)",
)
filename = QtGui.QFileDialog.getOpenFileName(
parent=self,
caption="Choose File",
directory=self._state["file_open_dir"],
filter="ASDF files (*.h5)",
)
if not filename:
return

# Open the parent dir of the current file the next time the file
# dialogue is opened.
self._state["file_open_dir"] = os.path.dirname(filename)
self._state["file_open_dir"] = os.path.dirname(filename[0])

self.open_file(filename)
self.open_file(filename[0])

@QtCore.Slot(int)
def on_custom_processing_check_box_stateChanged(self, state):
Expand Down

0 comments on commit b95aaff

Please sign in to comment.