Skip to content

Commit

Permalink
[processing] removed message dialog when saving model. Using message …
Browse files Browse the repository at this point in the history
…bar instead
  • Loading branch information
volaya committed Oct 5, 2016
1 parent e1072e9 commit 96406e5
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions python/plugins/processing/modeler/ModelerDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@
from qgis.PyQt import uic
from qgis.PyQt.QtCore import Qt, QRectF, QMimeData, QPoint, QPointF, QSettings, QByteArray
from qgis.PyQt.QtWidgets import QGraphicsView, QTreeWidget, QMessageBox, QFileDialog, QTreeWidgetItem
from qgis.PyQt.QtGui import QIcon, QImage, QPainter
from qgis.PyQt.QtGui import QIcon, QImage, QPainter, QSizePolicy
from qgis.core import QgsApplication
from qgis.gui import QgsMessageBar
from processing.core.ProcessingConfig import ProcessingConfig
from processing.core.ProcessingLog import ProcessingLog
from processing.gui.HelpEditionDialog import HelpEditionDialog
Expand All @@ -60,6 +61,10 @@ def __init__(self, alg=None):
super(ModelerDialog, self).__init__(None)
self.setupUi(self)

self.bar = QgsMessageBar()
self.bar.setSizePolicy(QSizePolicy.Minimum, QSizePolicy.Fixed)
self.layout().insertWidget(1, self.bar)

self.zoom = 1

self.setWindowFlags(Qt.WindowMinimizeButtonHint |
Expand Down Expand Up @@ -335,9 +340,8 @@ def saveModel(self, saveAs):
fout.write(text)
fout.close()
self.update = True
QMessageBox.information(self, self.tr('Model saved'),
self.tr('Model was correctly saved.'))

self.bar.pushMessage("", "Model was correctly saved", level = QgsMessageBar.SUCCESS, duration = 5)

self.hasChanged = False

def openModel(self):
Expand Down

0 comments on commit 96406e5

Please sign in to comment.