jfjoch_viewer: a broker URL given on the command line opens following the collection
`jfjoch_viewer http://<broker>` 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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HVeDQsU5a8AJUdJPgWevAK
This commit is contained in:
1 parent
e6bd34e71e
commit
5f5dfc6ae3
1 file changed
+5
-2
@@ -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() {
|
||||
|
||||
Reference in new issue
Block a user