summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Noga <Tempus@chronometry.ca>2011-12-30 04:28:58 -0600
committerColin Noga <Tempus@chronometry.ca>2011-12-30 04:28:58 -0600
commit43aa70b5a1e574a4e133a4bb9c50ab3ad9006139 (patch)
tree70ed58c155aa4fb63ab553f90c61099fc19d3d2d
parent5adfa5973564bec0638d661339240c1df61f41d5 (diff)
downloadkoopatlas-43aa70b5a1e574a4e133a4bb9c50ab3ad9006139.tar.gz
koopatlas-43aa70b5a1e574a4e133a4bb9c50ab3ad9006139.zip
cleaning up some loose ends
-rw-r--r--src/editorui/editormain.py2
-rw-r--r--src/ui.py16
2 files changed, 13 insertions, 5 deletions
diff --git a/src/editorui/editormain.py b/src/editorui/editormain.py
index 6161e7d..32fd94b 100644
--- a/src/editorui/editormain.py
+++ b/src/editorui/editormain.py
@@ -64,7 +64,7 @@ class KPMapScene(QtGui.QGraphicsScene):
@QtCore.pyqtSlot(int)
- def viewportUpdateProxy(self, valueA = None, value = None):
+ def viewportUpdateProxy(self, value):
self.views()[0].viewport().update()
diff --git a/src/ui.py b/src/ui.py
index d5418bc..310e3b7 100644
--- a/src/ui.py
+++ b/src/ui.py
@@ -773,7 +773,9 @@ class KPMainWindow(QtGui.QMainWindow):
@QtCore.pyqtSlot(KPLayer)
def handleSelectedLayerChanged(self, layer):
- self.pathNodeList.tree.selectionModel().clearSelection()
+ sel = self.pathNodeList.tree.selectionModel()
+ if sel:
+ sel.clearSelection()
self.scene.setCurrentLayer(layer)
@@ -795,7 +797,9 @@ class KPMainWindow(QtGui.QMainWindow):
@QtCore.pyqtSlot(KPLayer)
def handleSelectedPathNodeLayerChanged(self, layer):
- self.layerList.listView.selectionModel().clearSelection()
+ sel = self.layerList.listView.selectionModel()
+ if sel:
+ sel.clearSelection()
self.scene.setCurrentLayer(layer)
@@ -810,7 +814,9 @@ class KPMainWindow(QtGui.QMainWindow):
@QtCore.pyqtSlot(int, KPTileObject)
def handleSelectedObjectChanged(self, index, obj):
- self.doodadSelector.listView.selectionModel().clearSelection()
+ sel = self.doodadSelector.listView.selectionModel()
+ if sel:
+ sel.clearSelection()
self.editor.objectToPaint = obj
self.editor.objectIDToPaint = index
@@ -819,7 +825,9 @@ class KPMainWindow(QtGui.QMainWindow):
@QtCore.pyqtSlot(object)
def handleSelectedDoodadChanged(self, doodad):
- self.objectSelector.listView.selectionModel().clearSelection()
+ sel = self.objectSelector.listView.selectionModel()
+ if sel:
+ sel.clearSelection()
self.editor.doodadToPaint = doodad
self.editor.typeToPaint = 'doodad'