Properly remove button from toolbar

Signed-off-by: Juraj Oravec <sgd.orava@gmail.com>
This commit is contained in:
Juraj Oravec 2019-06-20 12:47:03 +02:00
parent 3c1a16afc6
commit 2ec9deb2aa
No known key found for this signature in database
GPG Key ID: 63ACB65056BC8D07

View File

@ -61,8 +61,12 @@ class Readability(Falkon.PluginInterface, QtCore.QObject):
self.buttons[window] = button
def onMainWindowDeleted(self, window):
if window in self.buttons:
del self.buttons[window]
if window not in self.buttons:
return
button = self.buttons[window]
window.navigationBar().removeToolButton(button)
del self.buttons[window]
def populateWebViewMenu(self, menu, view, hitTestResult):
if not self.config["contextMenu"]: