Skip to content

Commit

Permalink
Merge pull request #223 from Bycelium/bugfix/display-right-files
Browse files Browse the repository at this point in the history
🎉 Restrict file loading to .ipyg and .ipynb
  • Loading branch information
MathisFederico authored Jan 16, 2022
2 parents 897728a + 85c02c8 commit 5be101a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pyflow/graphics/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,14 @@ def onFileNew(self):

def onFileOpen(self):
"""Open a file."""
filename, _ = QFileDialog.getOpenFileName(self, "Open ipygraph from file")

filename, _ = QFileDialog.getOpenFileName(
self,
"Open ipygraph from file",
"",
"Interactive python graph or notebook (*.ipyg *.ipynb)",
)

if filename == "":
return
if os.path.isfile(filename):
Expand Down

0 comments on commit 5be101a

Please sign in to comment.