Repository navigation
CP: Fix options stuck read-only after stopping streams in viewer - #15025
Conversation
…topping streams in viewer
|
|
||
| // Invalidate after close() so options whose read-only depends on is_opened() refresh correctly. | ||
| _options_invalidated = true; | ||
| }); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Ignoring, just a CP PR
Tracked on: [RSDSO-21462]