diff --git a/rtgui/inspector.cc b/rtgui/inspector.cc index 7d5d44e44..3f9fab4fe 100644 --- a/rtgui/inspector.cc +++ b/rtgui/inspector.cc @@ -114,6 +114,10 @@ void Inspector::showWindow(bool scaled) window.fullscreen(); window.set_visible(true); pinned = false; + + // update content when becoming visible + switchImage(next_image_path); + mouseMove(next_image_pos, 0); } bool Inspector::on_key_release(GdkEventKey *event) @@ -423,6 +427,12 @@ void Inspector::mouseMove (rtengine::Coord2D pos, int transform) return; } + next_image_pos = pos; + + // skip actual update of content when not visible + if (!window.get_visible()) + return; + if (currImage) { center.set(int(rtengine::LIM01(pos.x)*double(currImage->imgBuffer.getWidth())), int(rtengine::LIM01(pos.y)*double(currImage->imgBuffer.getHeight()))); } else { @@ -443,6 +453,11 @@ void Inspector::switchImage (const Glib::ustring &fullPath) } next_image_path = fullPath; + + // skip actual update of content when not visible + if (!window.get_visible()) + return; + if (!options.inspectorDelay) { doSwitchImage(); } else { diff --git a/rtgui/inspector.h b/rtgui/inspector.h index 9a99fb8a6..00a8e24a7 100644 --- a/rtgui/inspector.h +++ b/rtgui/inspector.h @@ -57,6 +57,7 @@ private: sigc::connection delayconn; Glib::ustring next_image_path; + rtengine::Coord2D next_image_pos; Gtk::Window window; bool on_key_release(GdkEventKey *event);