Skip to content
This repository was archived by the owner on Aug 28, 2020. It is now read-only.

Commit 8e7d6f0

Browse files
committed
save the current project name in application settings
1 parent b04cccd commit 8e7d6f0

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

pugdebug/pugdebug.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from pugdebug.models.documents import PugdebugDocuments
2222
from pugdebug.models.file_browser import PugdebugFileBrowser
2323
from pugdebug.models.projects import PugdebugProjects
24-
from pugdebug.models.settings import get_setting, save_settings
24+
from pugdebug.models.settings import get_setting, set_setting, save_settings
2525

2626

2727
class Pugdebug(QObject):
@@ -275,14 +275,22 @@ def load_project(self, project):
275275
276276
Get the settings for the project and load them as the current
277277
application settings.
278+
279+
Set the current project name in the window title.
280+
281+
Set the current project name setting in application settings.
278282
"""
279283
project_settings = project.get_settings()
280284

281285
changed_settings = save_settings(project_settings)
282286

283287
self.handle_settings_changed(changed_settings)
284288

285-
self.main_window.set_window_title(project.get_project_name())
289+
project_name = project.get_project_name()
290+
291+
self.main_window.set_window_title(project_name)
292+
293+
set_setting('current_project', project_name)
286294

287295
def file_browser_item_activated(self, index):
288296
"""Handle when file browser item gets activated

0 commit comments

Comments
 (0)