Skip to content

Commit

Permalink
PR #11349 from remibettan: turning flag to true when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
Nir-Az authored Jan 24, 2023
2 parents 16d1ee4 + eda1055 commit 05960ad
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions common/option-model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,8 @@ bool option_model::draw_checkbox( notifications_model & model,
<< ( bool_value ? "ON" : "OFF" ) << ")" );

set_option( opt, bool_value ? 1.f : 0.f, error_message );
if (invalidate_flag)
*invalidate_flag = true;
}
if( ImGui::IsItemHovered() && description )
{
Expand All @@ -528,7 +530,8 @@ bool option_model::slider_selected( rs2_option opt,
if( option_was_set )
{
have_unset_value = false;
*invalidate_flag = true;
if (invalidate_flag)
*invalidate_flag = true;
model.add_log( rsutils::string::from() << "Setting " << opt << " to " << value );
res = true;
}
Expand Down Expand Up @@ -556,7 +559,8 @@ bool option_model::slider_unselected( rs2_option opt,
if( set_ok )
{
model.add_log( rsutils::string::from() << "Setting " << opt << " to " << unset_value );
*invalidate_flag = true;
if (invalidate_flag)
*invalidate_flag = true;
have_unset_value = false;
res = true;
}
Expand Down

0 comments on commit 05960ad

Please sign in to comment.