Skip to content

CP: Fix options stuck read-only after stopping streams in viewer - #15025

Merged
Nir-Az merged 1 commit into
realsenseai:r/2.58.1from
AviaAv:R/2.58.1
May 6, 2026
Merged

Nir-Az merged 1 commit into
realsenseai:r/2.58.1from
AviaAv:R/2.58.1

Conversation

@AviaAv

@AviaAv AviaAv commented May 6, 2026

Copy link
Copy Markdown
Contributor

Tracked on: [RSDSO-21462]

@AviaAv
AviaAv requested a review from Nir-Az May 6, 2026 07:09

// Invalidate after close() so options whose read-only depends on is_opened() refresh correctly.
_options_invalidated = true;
});

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

generated by rs-agentic

The placement of _options_invalidated = true after sensor_ptr->close() is the correct fix. Options that derive their read-only state from is_opened() would have been refreshed while the sensor was still technically open (between stop() and close()), causing them to remain stuck in read-only mode. By invalidating after close(), the next UI refresh will see is_opened() == false and correctly unlock those options.

One minor note: if sensor_ptr->close() throws an exception, _options_invalidated will not be set. Ensure exception handling in the surrounding call-site is consistent so a failed close() does not leave the UI in a stale/read-only state.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignoring, just a CP PR

@Nir-Az
Nir-Az merged commit e75131d into realsenseai:r/2.58.1 May 6, 2026
28 of 29 checks passed
@AviaAv
AviaAv deleted the R/2.58.1 branch May 12, 2026 08:04
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.

2 participants