Viewer: stop forcing FullViewportUpdate in JFJochSimpleImage
FullViewportUpdate redraws the whole viewport on any change. The attached
comment ("keep overlays in pixel units independent of zoom") does not describe
what the setting does, and nothing here needs it: SmartViewportUpdate repaints
the changed rectangles and falls back to a full repaint by itself once there
are too many to be worth tracking.
This is the view used by the calibration window and the magnifier, and the
magnifier is driven from every hover, so on a remote session it repainted
its whole viewport per pointer motion.
Note: not exercised visually -- both windows are opened from menus, which the
headless harness does not drive. The change is a repaint-mode switch with no
effect on what is drawn.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -16,8 +16,9 @@ JFJochSimpleImage::JFJochSimpleImage(QWidget *parent)
|
||||
auto *scn = new QGraphicsScene(this);
|
||||
setScene(scn);
|
||||
|
||||
// Keep overlays in pixel units independent of zoom (for labels font sizing)
|
||||
setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
|
||||
// Repaint only what changed. FullViewportUpdate redraws the entire viewport on any change,
|
||||
// which is wasted work locally and, on a remote session, uploads far more than was touched.
|
||||
setViewportUpdateMode(QGraphicsView::SmartViewportUpdate);
|
||||
|
||||
// The predicted/float image is unreadable with 3-decimal per-pixel labels.
|
||||
label_decimals_ = 1;
|
||||
|
||||
Reference in New Issue
Block a user