summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Noga <Tempus@chronometry.ca>2012-07-23 12:28:50 -0500
committerColin Noga <Tempus@chronometry.ca>2012-07-23 12:28:50 -0500
commite3bbfbabe74bb525adcf16b784338c4cf4e7507c (patch)
tree0cc5c2e0925cca094e48d031e502e7ad321aa41a
parentb12d27291609d79abe2e0e0817acdf5a1c3e2acb (diff)
downloadkoopatlas-e3bbfbabe74bb525adcf16b784338c4cf4e7507c.tar.gz
koopatlas-e3bbfbabe74bb525adcf16b784338c4cf4e7507c.zip
Reverted multi-layer selection changes to only the selected layer and path layers
Diffstat (limited to '')
-rw-r--r--src/dialogs.py16
-rw-r--r--src/editorui/doodads.py10
-rw-r--r--src/editorui/editormain.py22
-rw-r--r--src/editorui/objects.py10
-rw-r--r--src/mapdata.py6
5 files changed, 32 insertions, 32 deletions
diff --git a/src/dialogs.py b/src/dialogs.py
index 945677c..99abcbb 100644
--- a/src/dialogs.py
+++ b/src/dialogs.py
@@ -90,16 +90,16 @@ class KPAnimationPresetChooser(QtGui.QDialog):
else:
self.presetList = ["Circle", "Wiggle", "Drifting Cloud"]
- self.presets = [ [["Loop", "Sinusoidial", 200.0, "X Position", -200.0, 200.0],
- ["Loop", "Cosinoidial", 200.0, "Y Position", -200.0, 200.0]],
+ self.presets = [ [["Loop", "Sinusoidial", 200.0, "X Position", -200.0, 200.0, 0, 0],
+ ["Loop", "Cosinoidial", 200.0, "Y Position", -200.0, 200.0, 0, 0]],
- [["Reversible Loop", "Sinusoidial", 50.0, "Y Scale", 100.0, 120.0],
- ["Loop", "Cosinoidial", 50.0, "X Scale", 100.0, 90.0],
- ["Reversible Loop", "Sinusoidial", 20.0, "Angle", 10.0, -10.0]],
+ [["Reversible Loop", "Sinusoidial", 50.0, "Y Scale", 100.0, 120.0, 0, 0],
+ ["Loop", "Cosinoidial", 50.0, "X Scale", 100.0, 90.0, 0, 0],
+ ["Reversible Loop", "Sinusoidial", 20.0, "Angle", 10.0, -10.0, 0, 0]],
- [["Loop", "Sinusoidial", 5000.0, "X Position", -400.0, 400.0],
- ["Loop", "Sinusoidial", 200.0, "Y Position", 10.0, -10.0],
- ["Reversible Loop", "Linear", 500.0, "Opacity", 80.0, 40.0]] ]
+ [["Loop", "Sinusoidial", 5000.0, "X Position", -400.0, 400.0, 0, 0],
+ ["Loop", "Sinusoidial", 200.0, "Y Position", 10.0, -10.0, 0, 0],
+ ["Reversible Loop", "Linear", 500.0, "Opacity", 80.0, 40.0, 0, 0]] ]
settings.setValue('AnimationPresets', mapfile.dump(self.presetList))
settings.setValue('AnimationPresetData', mapfile.dump(self.presets))
diff --git a/src/editorui/doodads.py b/src/editorui/doodads.py
index 89ccfc7..068c420 100644
--- a/src/editorui/doodads.py
+++ b/src/editorui/doodads.py
@@ -426,9 +426,9 @@ class KPEditorDoodad(KPEditorItem):
def hoverMoveEvent(self, event):
- # if self._layerRef() != KP.mapScene.currentLayer:
- # self.setCursor(Qt.ArrowCursor)
- # return
+ if self._layerRef() != KP.mapScene.currentLayer:
+ self.setCursor(Qt.ArrowCursor)
+ return
pos = event.pos()
bit = self.resizerPortionAt(pos.x(), pos.y())
@@ -460,8 +460,8 @@ class KPEditorDoodad(KPEditorItem):
pos = event.pos()
bit = self.resizerPortionAt(pos.x(), pos.y())
- # if self._layerRef() == KP.mapScene.currentLayer and bit:
- if bit:
+ if self._layerRef() == KP.mapScene.currentLayer and bit:
+ # if bit:
event.accept()
if (event.modifiers() & Qt.ShiftModifier):
diff --git a/src/editorui/editormain.py b/src/editorui/editormain.py
index 60a09a5..4b2e686 100644
--- a/src/editorui/editormain.py
+++ b/src/editorui/editormain.py
@@ -736,19 +736,19 @@ class KPEditorWidget(QtGui.QGraphicsView):
def mousePressEvent(self, event):
- itemsUnder = self.scene().items(self.mapToScene(event.pos()), Qt.IntersectsItemShape, Qt.AscendingOrder)
+ # itemsUnder = self.scene().items(self.mapToScene(event.pos()), Qt.IntersectsItemShape, Qt.AscendingOrder)
if event.button() == Qt.RightButton:
self._tryToPaint(event)
event.accept()
- elif itemsUnder:
- QtGui.QGraphicsView.mousePressEvent(self, event)
+ # elif itemsUnder:
+ # QtGui.QGraphicsView.mousePressEvent(self, event)
- if len(self.scene().selectedItems()) < 2:
- self.scene().clearSelection()
- itemsUnder[0].setSelected(True)
- itemsUnder[0].grabMouse()
+ # if len(self.scene().selectedItems()) < 2:
+ # self.scene().clearSelection()
+ # itemsUnder[0].setSelected(True)
+ # itemsUnder[0].grabMouse()
else:
QtGui.QGraphicsView.mousePressEvent(self, event)
@@ -765,10 +765,10 @@ class KPEditorWidget(QtGui.QGraphicsView):
def mouseReleaseEvent(self, event):
QtGui.QGraphicsView.mouseReleaseEvent(self, event)
- try:
- self.scene().mouseGrabberItem().ungrabMouse()
- except:
- pass
+ # try:
+ # self.scene().mouseGrabberItem().ungrabMouse()
+ # except:
+ # pass
self.userClick.emit()
diff --git a/src/editorui/objects.py b/src/editorui/objects.py
index 71566a6..872e289 100644
--- a/src/editorui/objects.py
+++ b/src/editorui/objects.py
@@ -51,9 +51,9 @@ class KPEditorObject(KPEditorItem):
def hoverMoveEvent(self, event):
- # if self._layerRef() != KP.mapScene.currentLayer:
- # self.setCursor(Qt.ArrowCursor)
- # return
+ if self._layerRef() != KP.mapScene.currentLayer:
+ self.setCursor(Qt.ArrowCursor)
+ return
pos = event.pos()
bit = self.resizerPortionAt(pos.x(), pos.y())
@@ -75,8 +75,8 @@ class KPEditorObject(KPEditorItem):
pos = event.pos()
bit = self.resizerPortionAt(pos.x(), pos.y())
- # if self._layerRef() == KP.mapScene.currentLayer and bit:
- if bit:
+ if self._layerRef() == KP.mapScene.currentLayer and bit:
+ # if bit:
event.accept()
x, xSide, y, ySide = False, None, False, None
diff --git a/src/mapdata.py b/src/mapdata.py
index bbf0b6c..c32bd7b 100644
--- a/src/mapdata.py
+++ b/src/mapdata.py
@@ -33,7 +33,7 @@ class KPLayer(object):
pass
def setActivated(self, value, listToUse=None):
- return
+ # return
flag1 = QtGui.QGraphicsItem.ItemIsSelectable
flag2 = QtGui.QGraphicsItem.ItemIsMovable
@@ -197,7 +197,7 @@ class KPPathTileLayer(KPLayer):
item.setVisible(value)
def setActivated(self, value, listToUse=None):
- return
+ # return
flag1 = QtGui.QGraphicsItem.ItemIsSelectable
flag2 = QtGui.QGraphicsItem.ItemIsMovable
@@ -532,7 +532,7 @@ class KPPathLayer(KPLayer):
item.setVisible(value)
def setActivated(self, value):
- return
+ # return
KPLayer.setActivated(self, value, self.nodes)
flag = QtGui.QGraphicsItem.ItemIsSelectable