diff --git a/wobuzz/gui_communication/settings.py b/wobuzz/gui_communication/settings.py index 6c46d71..5026aad 100644 --- a/wobuzz/gui_communication/settings.py +++ b/wobuzz/gui_communication/settings.py @@ -10,9 +10,10 @@ class Settings: self.connect() def connect(self): - self.settings.file_settings.library_path_input.returnPressed.connect(self.write_settings) + self.settings.visibilityChanged.connect(self.update_all) + self.settings.save_button.pressed.connect(self.write_settings) - def update_all(self): + def update_all(self, settings_visible: bool=True): self.settings.file_settings.library_path_input.setText(self.app.settings.library_path) def update_settings(self, key, value): diff --git a/wobuzz/ui/settings/settings.py b/wobuzz/ui/settings/settings.py index c515021..40d22bf 100644 --- a/wobuzz/ui/settings/settings.py +++ b/wobuzz/ui/settings/settings.py @@ -27,8 +27,8 @@ class Settings(QDockWidget): self.tabs.addTab(self.file_settings, "Files") self.content_layout.addWidget(self.tabs) - self.save_settings_button = QPushButton("&Save", self.content) - self.content_layout.addWidget(self.save_settings_button) + self.save_button = QPushButton("&Save", self.content) + self.content_layout.addWidget(self.save_button) self.setWidget(self.content)