enhance context menu, draw object center, recenter if image out of view

This commit is contained in:
2022-09-09 16:51:53 +02:00
parent 189c98951a
commit 8af0839281
3 changed files with 25 additions and 12 deletions

View File

@@ -1081,10 +1081,10 @@ class WndSwissMx(QMainWindow, Ui_MainWindow):
#if none of the image is visible, recenter it
r1=self.vb.viewRect()
#r2=self.vb.itemBoundingRect(self._goImg)
r2=self.vb.itemBoundingRect(self._goBeamMarker)
r2=self.vb.itemBoundingRect(self._goImg)
if not r1.intersects(r2):
self.vb.autoRange(items=(self._goImg,))
r1.translate(r2.center()-r1.center())
self.vb.setRange(r1)
try:
pln=geo._fitPlane