Skip to content
Permalink
Browse files

[processing] removed message dialog when saving model. Using message …

…bar instead
  • Loading branch information
volaya committed Oct 5, 2016
1 parent e1072e9 commit 96406e52cddc1e7d2f66cb58785949e8312237cd
Showing with 8 additions and 4 deletions.
  1. +8 −4 python/plugins/processing/modeler/ModelerDialog.py
@@ -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
@@ -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 |
@@ -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):

0 comments on commit 96406e5

Please sign in to comment.
You can’t perform that action at this time.