Skip to content

Commit

Permalink
Merge pull request #9238 from remibettan/viewer-depth-units-edit-fix
Browse files Browse the repository at this point in the history
Viewer - depth units changing fix
  • Loading branch information
ev-mp committed Jun 16, 2021
2 parents d124ec4 + 5b53ebe commit 42a4cd1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions common/model-views.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -801,8 +801,7 @@ namespace rs2
if (ImGui::SliderFloat(id.c_str(), &temp_value_displayed,
min_range_displayed, max_range_displayed, formatting_ss.str().c_str()))
{
if (use_cm_units)
tmp_value = temp_value_displayed / 100.f;
tmp_value = use_cm_units ? temp_value_displayed / 100.f : temp_value_displayed;
auto loffset = std::abs(fmod(tmp_value, range.step));
auto roffset = range.step - loffset;
if (tmp_value >= 0)
Expand Down

0 comments on commit 42a4cd1

Please sign in to comment.