diff --git a/viewer/windows/JFJochViewerReciprocalSpaceWindow.cpp b/viewer/windows/JFJochViewerReciprocalSpaceWindow.cpp index 0eb41f23..1c992796 100644 --- a/viewer/windows/JFJochViewerReciprocalSpaceWindow.cpp +++ b/viewer/windows/JFJochViewerReciprocalSpaceWindow.cpp @@ -472,6 +472,12 @@ void JFJochViewerReciprocalSpaceWindow::imageLoaded(std::shared_ptrisChecked() && has_rotation_; std::optional plot_lattice; diff --git a/viewer/windows/JFJochViewerReciprocalSpaceWindow.h b/viewer/windows/JFJochViewerReciprocalSpaceWindow.h index 67d5a6c1..22a3d619 100644 --- a/viewer/windows/JFJochViewerReciprocalSpaceWindow.h +++ b/viewer/windows/JFJochViewerReciprocalSpaceWindow.h @@ -143,7 +143,12 @@ private: }; QColor spotColorFor(bool indexed, bool ice_ring) const; + // rebuildGL() is a no-op while the window is closed - it only records that a rebuild is + // owed, and showEvent() pays it. rebuildGLNow() is the actual work. void rebuildGL(); // rebuilds both spot and line vertex data + void rebuildGLNow(); + void showEvent(QShowEvent *event) override; + bool pending_rebuild_ = false; void loadCurrentImageSpots(std::shared_ptr image); void addSpot(const SpotToSave &s, const DiffractionGeometry &geom,