summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/editorui/editormain.py27
-rw-r--r--src/ui.py1
2 files changed, 28 insertions, 0 deletions
diff --git a/src/editorui/editormain.py b/src/editorui/editormain.py
index 3d2f17d..5dc8703 100644
--- a/src/editorui/editormain.py
+++ b/src/editorui/editormain.py
@@ -391,6 +391,32 @@ class KPEditorWidget(QtGui.QGraphicsView):
self.assignNewScene(scene)
+ def drawForeground(self, painter, rect):
+
+ painter.setPen(Qt.red)
+ painter.setBrush(Qt.transparent)
+
+ c = rect.center()
+ x = c.x()
+ y = c.y()
+
+ zooms = [5.0, 10.0, 25.0, 50.0, 75.0, 100.0, 150.0, 200.0, 400.0]
+ m = zooms[KP.mainWindow.ZoomLevel] / 100.0
+
+ mx = 880.0 / 2.0 * m
+ my = 660.0 / 2.0 * m
+
+ m2x = 1180.0 / 2.0 * m
+ m2y = 660.0 / 2.0 * m
+
+ # mx = 1792.0 / 2.0 * m
+ # my = 1344.0 / 2.0 * m
+ newRect = QtCore.QRectF(x-mx, y-my, mx*2.0, my*2.0)
+ painter.drawRect(newRect)
+
+ newRect2 = QtCore.QRectF(x-m2x, y-m2y, m2x*2.0, m2y*2.0)
+ painter.drawRect(newRect2)
+
def assignNewScene(self, scene):
self.setScene(scene)
self.centerOn(0,0)
@@ -733,6 +759,7 @@ class KPEditorWidget(QtGui.QGraphicsView):
obj.setSelected(False)
obj.remove(True)
scene.update()
+ self.userClick.emit()
self.update()
return
diff --git a/src/ui.py b/src/ui.py
index 74e1fdc..568a0a8 100644
--- a/src/ui.py
+++ b/src/ui.py
@@ -1111,6 +1111,7 @@ class KPMainWindow(QtGui.QMainWindow):
self.scene = KPMapScene()
self.editor.assignNewScene(self.scene)
+ self.anmPopulate()
self.updateTitlebar()
def updateTitlebar(self):