Edit book: Hide editor toolbars if theya re empty. Fixes #1706343 [Ebook editor always shows editing toolbars even when they're empty](https://bugs.launchpad.net/calibre/+bug/1706343)

This commit is contained in:
Kovid Goyal 2017-07-27 14:43:06 +05:30
parent 234a7b88f9
commit bd463afc81
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -356,6 +356,8 @@ class Editor(QMainWindow):
state = tprefs.get('%s-editor-state' % self.syntax, None)
if state is not None:
self.restoreState(state)
for bar in self.bars:
bar.setVisible(len(bar.actions()) > 0)
def populate_toolbars(self):
self.action_bar.clear(), self.tools_bar.clear()