Starting to make persistent tabs persistent

This commit is contained in:
Micah Lee 2019-11-02 21:45:55 -07:00
parent 1b36fe4036
commit a5f8fee065
No known key found for this signature in database
GPG key ID: 403C2657CD994F73
9 changed files with 115 additions and 25 deletions

View file

@ -120,8 +120,13 @@ class MainWindow(QtWidgets.QMainWindow):
# Tabs
self.tabs = TabWidget(self.common, self.system_tray, self.status_bar)
# Start with opening the first tab
self.tabs.new_tab_clicked()
# If we have saved persistent tabs, try opening those
if len(self.common.settings.get("persistent_tabs")) > 0:
for mode_settings_id in self.common.settings.get("persistent_tabs"):
self.tabs.load_tab(mode_settings_id)
else:
# Start with opening the first tab
self.tabs.new_tab_clicked()
# Layout
layout = QtWidgets.QVBoxLayout()