diff options
Diffstat (limited to 'ui/profile_manager_ui.py')
| -rw-r--r-- | ui/profile_manager_ui.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ui/profile_manager_ui.py b/ui/profile_manager_ui.py index 446e867..79f333e 100644 --- a/ui/profile_manager_ui.py +++ b/ui/profile_manager_ui.py @@ -85,13 +85,21 @@ class ProfileButton(QPushButton): ) if not path: return + self.load_path(path) + + def load_path(self, path: str) -> bool: + """Load a profile from an explicit path — shared by the file dialog + above and by opening a .labui file from the OS (double-click / CLI + argv), see main.py.""" try: profile = Profile.load(path) self._apply_profile(profile) self._current_path = path self._update_title(profile.name) + return True except Exception as e: QMessageBox.critical(self, "Load Failed", str(e)) + return False def _do_save(self): if not self._current_path: |
