diff clients/editor/plugins/mapeditor.py @ 50:9d0a21184c13

fix for editor, gui event consumption was not checked properly
author jasoka@33b003aa-7bff-0310-803a-e67f0ece8222
date Sun, 13 Jul 2008 13:14:04 +0000
parents 4a0efb7baf70
children adf0f2b6d1b0
line wrap: on
line diff
--- a/clients/editor/plugins/mapeditor.py	Sun Jul 13 12:47:57 2008 +0000
+++ b/clients/editor/plugins/mapeditor.py	Sun Jul 13 13:14:04 2008 +0000
@@ -347,6 +347,9 @@
 		self._camera.refresh()
 	
 	def mousePressed(self, evt):
+		if evt.isConsumedByWidgets():
+			return
+		
 		if self._ctrldown:
 			if evt.getButton() == fife.MouseEvent.LEFT:
 				self._dragx = evt.getX()
@@ -366,6 +369,9 @@
 				self._setMode(self._mode) # refresh status
 	
 	def mouseDragged(self, evt):
+		if evt.isConsumedByWidgets():
+			return
+		
 		if self._ctrldown:
 			if (self._dragx != NOT_INITIALIZED) and (self._dragy != NOT_INITIALIZED):
 				self._moveCamera(evt.getX() - self._dragx, evt.getY() - self._dragy)
@@ -383,6 +389,9 @@
 				self._moveInstances()
 
 	def mouseReleased(self, evt):
+		if evt.isConsumedByWidgets():
+			return
+		
 		self._dragx = NOT_INITIALIZED
 		self._dragy = NOT_INITIALIZED