Restrict file dialog to .mflow files only and return to login on load error
- Remove "All files (*)" option from file dialog, only allow .mflow files - Change error handling to return to login page instead of opening empty pipeline - Update error message to be more specific about file format requirements - Properly clean up dashboard window when file load fails 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
92f9d956af
commit
0cf0bc6350
@ -380,7 +380,7 @@ class DashboardLogin(QWidget):
|
||||
self,
|
||||
"Open Pipeline File",
|
||||
self.settings.get_default_project_location(),
|
||||
"Pipeline files (*.mflow);;All files (*)"
|
||||
"Pipeline files (*.mflow)"
|
||||
)
|
||||
|
||||
if file_path:
|
||||
@ -436,10 +436,15 @@ class DashboardLogin(QWidget):
|
||||
except Exception as e:
|
||||
QMessageBox.warning(
|
||||
self,
|
||||
"File Load Warning",
|
||||
"File Load Error",
|
||||
f"Could not load pipeline file: {e}\n\n"
|
||||
"Opening with empty pipeline instead."
|
||||
"Please select a valid .mflow file."
|
||||
)
|
||||
# Close the dashboard window and return to login page
|
||||
self.dashboard_window.close()
|
||||
self.dashboard_window = None
|
||||
self.show() # Show the login window again
|
||||
return
|
||||
|
||||
self.dashboard_window.show()
|
||||
self.hide() # Hide the login window
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user