Changeset 3810 for trunk/tools/editor/scripts/gui/mapeditor.py
- Timestamp:
- 11/12/11 21:28:22 (19 months ago)
- File:
-
- 1 edited
-
trunk/tools/editor/scripts/gui/mapeditor.py (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/editor/scripts/gui/mapeditor.py
r3637 r3810 399 399 self._controller.getUndoManager().startGroup("Inserted instances") 400 400 self._undogroup = True 401 402 position = self._controller. _camera.toMapCoordinates(fife.ScreenPoint(realCoords[0], realCoords[1]), False)401 402 position = self._controller.screenToMapCoordinates(realCoords[0], realCoords[1]) 403 403 position = self._controller._layer.getCellGrid().toLayerCoordinates(position) 404 404 … … 417 417 elif self._mode == MapEditor.MOVING: 418 418 if event.getButton() == fife.MouseEvent.LEFT: 419 420 position = self._controller._camera.toMapCoordinates(fife.ScreenPoint(realCoords[0], realCoords[1]), False) 419 position = self._controller.screenToMapCoordinates(realCoords[0], realCoords[1]) 421 420 422 421 self._last_drag_pos = self._controller._layer.getCellGrid().toLayerCoordinates(position) … … 439 438 440 439 elif self._mode == MapEditor.OBJECTPICKER: 441 position = self._controller. _camera.toMapCoordinates(fife.ScreenPoint(realCoords[0], realCoords[1]), False)440 position = self._controller.screenToMapCoordinates(realCoords[0], realCoords[1]) 442 441 exact = self._controller._layer.getCellGrid().toExactLayerCoordinates(position) 443 442 instances = self._controller.getInstancesFromPosition(exact) … … 473 472 474 473 elif self._mode == MapEditor.INSERTING: 475 position = self._controller. _camera.toMapCoordinates(fife.ScreenPoint(realCoords[0], realCoords[1]), False)474 position = self._controller.screenToMapCoordinates(realCoords[0], realCoords[1]) 476 475 position = self._controller._layer.getCellGrid().toLayerCoordinates(position) 477 476 … … 484 483 485 484 elif self._mode == MapEditor.MOVING: 486 position = self._controller._camera.toMapCoordinates(fife.ScreenPoint(realCoords[0], realCoords[1]), False) 487 485 position = self._controller.screenToMapCoordinates(realCoords[0], realCoords[1]) 488 486 positionExact = self._controller._layer.getCellGrid().toExactLayerCoordinates(position) 489 487 position = self._controller._layer.getCellGrid().toLayerCoordinates(position)
Note: See TracChangeset
for help on using the changeset viewer.
