properly restore active tab
This commit is contained in:
parent
8c3af6a02e
commit
dfd4623a18
|
@ -267,15 +267,15 @@ class BrowserWindow(Gtk.ApplicationWindow):
|
|||
with db.session() as s:
|
||||
active_tab = self.tabs.get_nth_page(self.tabs.get_current_page())
|
||||
|
||||
for index, tabid in enumerate(self.tabdata.keys()):
|
||||
tab = self.tabdata[tabid].contents
|
||||
webview = tab.webview
|
||||
for tabid, tab in self.tabdata.items():
|
||||
index = self.tabs.page_num(tab.widget)
|
||||
webview = tab.contents.webview
|
||||
|
||||
if not webview:
|
||||
continue
|
||||
|
||||
state = webview.get_session_state().serialize()
|
||||
active = active_tab == tab
|
||||
active = active_tab == tab.widget
|
||||
tabrow = s.fetch('tabs', tabid=tabid)
|
||||
data = {
|
||||
'state': state.get_data(),
|
||||
|
@ -350,7 +350,6 @@ class BrowserWindow(Gtk.ApplicationWindow):
|
|||
self.tabs.set_tab_reorderable(self.tabdata[currtab].widget, True)
|
||||
|
||||
if row:
|
||||
print('Load state:', currtab)
|
||||
self.tabdata[currtab].contents.LoadState(row)
|
||||
switch = row.active
|
||||
|
||||
|
|
Reference in a new issue