diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-02-24 08:29:02 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-02-24 08:29:02 +0100 |
commit | 9c5216232527665850fc5ef0be9ff53b27a763b8 (patch) | |
tree | 1db0fcce871edd6ec5e964ec6e140297f49d0158 /editor | |
parent | ac5c30dbbd920200b32072bb1dfffeebaa061c18 (diff) |
a
Diffstat (limited to 'editor')
-rw-r--r-- | editor/inspect.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/editor/inspect.cpp b/editor/inspect.cpp index 165fa877..ce06d790 100644 --- a/editor/inspect.cpp +++ b/editor/inspect.cpp @@ -122,7 +122,7 @@ void do_inspect_field(void* datum, const erased_accessor& accessor, field_repr r { const bool is_selected = x == (std::size_t)old_value; if (ImGui::Selectable(str.data(), is_selected)) - value = T(x); + value = T(x), ret = true; if (is_selected) ImGui::SetItemDefaultFocus(); } @@ -157,8 +157,6 @@ void do_inspect_field(void* datum, const erased_accessor& accessor, field_repr r value[i] = std::clamp(value[i], min[i], max[i]); } - ImGui::NewLine(); - if (ret && !should_disable && !eqv(value, orig)) if (accessor.is_enabled(datum) >= field_status::enabled && accessor.can_write()) accessor.write_fun(datum, accessor.writer, &value); |