Skip to content

Commit 6914bf1

Browse files
committed
Correct toolbars visibility management
1 parent 385c38a commit 6914bf1

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

ReText/config.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,10 @@ def getPageWidget(self, options):
223223
elif name == 'directoryPath':
224224
self.configurators[name] = DirectorySelectButton(self, value, fileLabel)
225225
elif name == 'hideToolBar':
226+
# A label that has been created but not yet laid out could remain visible even after its reference has been dropped
227+
label.setParent(None)
226228
label = None
229+
227230
gb = QGroupBox("Toolbars")
228231
gb.setCheckable(True)
229232
gb.setChecked(not globalSettings.hideToolBar)

ReText/window.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1463,11 +1463,5 @@ def manage_toolbars_visibility(self):
14631463

14641464
self.toolBar.setVisible(shown and globalSettings.showToolBarFile)
14651465
self.editBar.setVisible(shown and globalSettings.showToolBarEdit)
1466-
1467-
if shown:
1468-
if globalSettings.showToolBarFormat:
1469-
self.formatBar.setVisible(True)
1470-
self.formattingBoxAction.setVisible(False)
1471-
else:
1472-
self.formatBar.setVisible(False)
1473-
self.formattingBoxAction.setVisible(True)
1466+
self.formatBar.setVisible(shown and globalSettings.showToolBarFormat)
1467+
self.formattingBoxAction.setVisible(shown and not globalSettings.showToolBarFormat)

0 commit comments

Comments
 (0)