mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix a bug where the open state of the splitter was not being saved on shutdown if the splitter had been closed at startup and was opened by dragging the center line
This commit is contained in:
parent
13e9f56b66
commit
b957bc1d12
@ -258,7 +258,9 @@ class LayoutMixin(object): # {{{
|
|||||||
getattr(self, x+'_view').save_state()
|
getattr(self, x+'_view').save_state()
|
||||||
|
|
||||||
for x in ('cb', 'tb', 'bd'):
|
for x in ('cb', 'tb', 'bd'):
|
||||||
getattr(self, x+'_splitter').save_state()
|
s = getattr(self, x+'_splitter')
|
||||||
|
s.update_desired_state()
|
||||||
|
s.save_state()
|
||||||
|
|
||||||
def read_layout_settings(self):
|
def read_layout_settings(self):
|
||||||
# View states are restored automatically when set_database is called
|
# View states are restored automatically when set_database is called
|
||||||
|
@ -1032,6 +1032,9 @@ class Splitter(QSplitter):
|
|||||||
|
|
||||||
# Public API {{{
|
# Public API {{{
|
||||||
|
|
||||||
|
def update_desired_state(self):
|
||||||
|
self.desired_show = not self.is_side_index_hidden
|
||||||
|
|
||||||
def save_state(self):
|
def save_state(self):
|
||||||
if self.count() > 1:
|
if self.count() > 1:
|
||||||
gprefs[self.save_name+'_state'] = self.get_state()
|
gprefs[self.save_name+'_state'] = self.get_state()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user