From 5f5dfc6ae3957548bfd61b8ecd5ffdb5d955500f Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Wed, 11 Nov 2026 16:29:13 +0100 Subject: [PATCH] jfjoch_viewer: a broker URL given on the command line opens following the collection `jfjoch_viewer http://` opened image 0, and for an HTTP source any image number >= 0 sets the autoload mode to None (JFJochImageReadingWorker::LoadFile_i), so the viewer showed the first image and never updated - no new images, plots or image count, with every receiver. The URL dialog already asks for image -1 (follow live); the command line now does the same for http:// and https://, and still opens a file at its first image. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01HVeDQsU5a8AJUdJPgWevAK --- viewer/JFJochViewerWindow.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/viewer/JFJochViewerWindow.cpp b/viewer/JFJochViewerWindow.cpp index 555a8c6aa..746bdfeb8 100644 --- a/viewer/JFJochViewerWindow.cpp +++ b/viewer/JFJochViewerWindow.cpp @@ -716,8 +716,11 @@ JFJochViewerWindow::JFJochViewerWindow(QWidget *parent, bool dbus, const QString menuBar->AddViewToggle(toolBarDisplay->backgroundSliderAction()); toolBarDisplay->showBackgroundSlider(settings.value("backgroundSlider", false).toBool()); - if (!file.isEmpty()) - LoadFile(file, 0, 1, false); + // A broker URL opens following the collection (image -1), as the URL dialog does; a file opens at its first image. + if (!file.isEmpty()) { + const bool http = file.startsWith("http://") || file.startsWith("https://"); + LoadFile(file, http ? -1 : 0, 1, false); + } } JFJochViewerWindow::~JFJochViewerWindow() {