Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabling measure when depth stream is stopped #9710

Merged
merged 1 commit into from
Sep 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions common/model-views.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2065,6 +2065,10 @@ namespace rs2
detected_objects->clear();
detected_objects->sensor_is_on = false;
}
else if (profiles[0].stream_type() == RS2_STREAM_DEPTH)
{
viewer.disable_measurements();
}

s->stop();

Expand Down
5 changes: 5 additions & 0 deletions common/viewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1023,6 +1023,11 @@ namespace rs2
return (_hidden_options.find(opt) != _hidden_options.end());
}

void rs2::viewer_model::disable_measurements()
{
_measurements.disable();
}

void rs2::viewer_model::show_popup(const ux_window& window, const popup& p)
{
auto font_14 = window.get_font();
Expand Down
2 changes: 2 additions & 0 deletions common/viewer.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ namespace rs2

bool is_option_skipped(rs2_option opt) const;

void disable_measurements();

std::mutex streams_mutex;
std::map<int, stream_model> streams;
std::map<int, int> streams_origin;
Expand Down