diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-06-07 04:21:59 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-06-07 04:21:59 +0200 |
commit | afdfc7f2f5d5f1f9620907016f8f56bd1e5e7adf (patch) | |
tree | e2132735e77217451bab0e5e5c3a8da721050ba9 | |
parent | d74a0ca1f0bca44b4c2ea657139cfadf883f0e4f (diff) |
inspector: fix feedback loop on setting object's tile to "999"
-rw-r--r-- | editor/inspect.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/editor/inspect.cpp b/editor/inspect.cpp index 821a1127..c0fac607 100644 --- a/editor/inspect.cpp +++ b/editor/inspect.cpp @@ -179,6 +179,11 @@ bool do_inspect_field(void* datum, const erased_accessor& accessor, field_repr r if (accessor.is_enabled(datum) >= field_status::enabled && accessor.can_write()) { accessor.write_fun(datum, accessor.writer, &value); + + T new_value{}; + accessor.read_fun(datum, accessor.reader, &new_value); + if (value != new_value) + GImGui->ActiveId = 0; return true; } return false; |