Added functionality to the save button.

This commit is contained in:
The Wobbler 2024-12-24 14:10:22 +01:00
parent ab018494e9
commit 7c6566e9a1
2 changed files with 5 additions and 4 deletions

View file

@ -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):

View file

@ -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)