Skip to content

Fix orphaned loop detection progress dialog - #1755

Merged
matlabbe merged 2 commits into
introlab:masterfrom
tandede:fix/detect-loop-progress-validation
Aug 27, 2026
Merged

Fix orphaned loop detection progress dialog#1755
matlabbe merged 2 commits into
introlab:masterfrom
tandede:fix/detect-loop-progress-validation

Conversation

@tandede

@tandede tandede commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #1462.

DatabaseViewer::detectMoreLoopClosures() currently constructs and shows its progress dialog before validating the session-selection options. When both intra-session and inter-session detection are disabled and no graph nodes are selected, the function displays the validation warning and returns, leaving the already-visible progress dialog behind.

Implementation

Move the existing progress-dialog construction block below that validation guard. No dialog settings or loop-closure behavior are changed:

  • invalid configurations now return after the warning without creating a progress dialog;
  • valid configurations create the same dialog with the same ownership, cancellation, sizing, and completion behavior as before.

I kept this as a pure control-flow fix rather than adding cleanup to the error branch, so the resource is never created when no work can start.

Validation

  • confirmed the issue path on current master: progress-dialog construction preceded the invalid-option guard;
  • confirmed the updated path evaluates the guard before constructing the dialog;
  • verified the relocated seven-line construction block is byte-for-byte unchanged;
  • git diff --check passes;
  • the change is limited to guilib/src/DatabaseViewer.cpp (+7/-7).

The repository does not currently provide a GUI test target for DatabaseViewer; the existing cross-platform CI builds will cover compilation of the relocated code.

@matlabbe

Copy link
Copy Markdown
Member

Looks good to me! will merge after CI run.

@matlabbe
matlabbe merged commit d494063 into introlab:master Aug 27, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DBViewer: "detect more loop closures" progress dialog cannot be closed if options are not valid

2 participants