enhance context menu, draw object center, recenter if image out of view
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user