Skip to content
Permalink
Browse files

[processing] save modeler dialog/splitter geometry to settings

  • Loading branch information
slarosa committed Sep 10, 2015
1 parent 08a5335 commit f3c7d853fd60732d0de361b65803d0f3be3dfaac
Showing with 9 additions and 1 deletion.
  1. +9 −1 python/plugins/processing/modeler/ModelerDialog.py
@@ -31,7 +31,7 @@
import os

from PyQt4 import uic
from PyQt4.QtCore import Qt, QRectF, QMimeData, QPoint, QPointF, QSettings
from PyQt4.QtCore import Qt, QRectF, QMimeData, QPoint, QPointF, QSettings, QByteArray
from PyQt4.QtGui import QGraphicsView, QTreeWidget, QIcon, QMessageBox, QFileDialog, QImage, QPainter, QTreeWidgetItem
from qgis.core import QgsApplication
from processing.core.ProcessingConfig import ProcessingConfig
@@ -66,6 +66,10 @@ def __init__(self, alg=None):
self.setWindowFlags(Qt.WindowMinimizeButtonHint |
Qt.WindowMaximizeButtonHint |
Qt.WindowCloseButtonHint)

settings = QSettings()
self.splitter.restoreState(settings.value("/Processing/splitterModeler", QByteArray()))
self.restoreGeometry(settings.value("/Processing/geometryModeler", QByteArray()))

self.tabWidget.setCurrentIndex(0)
self.scene = ModelerScene(self)
@@ -203,6 +207,10 @@ def _mimeDataAlgorithm(items):
self.hasChanged = False

def closeEvent(self, evt):
settings = QSettings()
settings.setValue("/Processing/splitterModeler", self.splitter.saveState())
settings.setValue("/Processing/geometryModeler", self.saveGeometry())

if self.hasChanged:
ret = QMessageBox.question(
self, self.tr('Unsaved changes'),

0 comments on commit f3c7d85

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