This repository was archived by the owner on Aug 28, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 1212from PyQt5 .QtCore import QCoreApplication , QSettings
1313from PyQt5 .QtGui import QStandardItemModel , QStandardItem
1414
15- from pugdebug .models .settings import get_projects
15+ from pugdebug .models .settings import get_projects , save_settings , has_setting
1616
1717
1818class PugdebugProject (QSettings ):
@@ -36,6 +36,15 @@ def __init__(self, project_name):
3636 def get_project_name (self ):
3737 return self .project_name
3838
39+ def get_settings (self ):
40+ project_settings = {}
41+
42+ for key in self .allKeys ():
43+ if has_setting (key ):
44+ project_settings [key ] = self .value (key )
45+
46+ return project_settings
47+
3948
4049class PugdebugProjects (QStandardItemModel ):
4150
Original file line number Diff line number Diff line change 2121from pugdebug .models .documents import PugdebugDocuments
2222from pugdebug .models .file_browser import PugdebugFileBrowser
2323from pugdebug .models .projects import PugdebugProjects
24- from pugdebug .models .settings import get_setting
24+ from pugdebug .models .settings import get_setting , save_settings
2525
2626
2727class Pugdebug (QObject ):
@@ -227,6 +227,11 @@ def connect_breakpoint_viewer_signals(self):
227227
228228 def projects_browser_item_activated (self , index ):
229229 project = self .projects_browser .model ().get_project_by_index (index )
230+ project_settings = project .get_settings ()
231+
232+ changed_settings = save_settings (project_settings )
233+
234+ self .handle_settings_changed (changed_settings )
230235
231236 def file_browser_item_activated (self , index ):
232237 """Handle when file browser item gets activated
You can’t perform that action at this time.
0 commit comments