Skip to content

Commit

Permalink
Cleaner messagebar item popping
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Sep 17, 2018
1 parent bfc5a17 commit 209b6ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/plugins/processing/gui/MessageBarProgress.py
Expand Up @@ -45,8 +45,8 @@ def __init__(self, algname=None):
self.progress.setMaximum(100)
self.progress.setAlignment(Qt.AlignLeft | Qt.AlignVCenter)
self.progressMessageBar.layout().addWidget(self.progress)
iface.messageBar().pushWidget(self.progressMessageBar,
Qgis.Info)
self.message_bar_item = iface.messageBar().pushWidget(self.progressMessageBar,
Qgis.Info)

def reportError(self, msg, fatalError=False):
self.msg.append(msg)
Expand All @@ -57,7 +57,7 @@ def close(self):
dlg.setTitle(QCoreApplication.translate('MessageBarProgress', 'Problem executing algorithm'))
dlg.setMessage("<br>".join(self.msg))
dlg.exec_()
iface.messageBar().clearWidgets()
iface.messageBar().popWidget(self.message_bar_item)

def tr(self, string, context=''):
if context == '':
Expand Down

0 comments on commit 209b6ee

Please sign in to comment.