+
+ bool zoom_to_fit_after_acq =
+ settings.value(GlobalSettings::Key_View_ZoomToFitAfterAcq).toBool();
+
+ // Only perform zoom-to-fit if the user hasn't altered the viewport and
+ // we didn't restore settings in the meanwhile
+ if (zoom_to_fit_after_acq &&
+ !suppress_zoom_to_fit_after_acq_ &&
+ (scale_ == scale_at_acq_start_) &&
+ (offset_ == offset_at_acq_start_))
+ zoom_fit(false); // We're stopped, so the GUI state doesn't matter
+
+ suppress_zoom_to_fit_after_acq_ = false;