diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-01-15 12:56:25 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-01-15 12:56:25 +0100 |
commit | e850be48828ce9cf4767b88707495257c98e88b0 (patch) | |
tree | 9428226b825611a0b1ad8920dc3b12e5995f11bb /editor/inspect-draw.cpp | |
parent | 9a231ffd8bd35108092d218c834544657bfb5986 (diff) |
b
Diffstat (limited to 'editor/inspect-draw.cpp')
-rw-r--r-- | editor/inspect-draw.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/editor/inspect-draw.cpp b/editor/inspect-draw.cpp index bc3237a5..34c096ea 100644 --- a/editor/inspect-draw.cpp +++ b/editor/inspect-draw.cpp @@ -17,14 +17,6 @@ void app::draw_inspector() { auto b = push_id("inspector"); - constexpr auto max_inspectors = 10; - if (auto size = inspectors.size(); size > max_inspectors) - { - auto end = inspectors.begin() + (ptrdiff_t)size - max_inspectors; - inspectors.erase(inspectors.begin(), end); - fm_assert(inspectors.size() <= max_inspectors); - } - const auto dpi = M->dpi_scale(); auto& w = M->world(); @@ -34,7 +26,7 @@ void app::draw_inspector() auto e_ = w.find_object(id); if (!e_) { - inspectors.erase(inspectors.begin() + ptrdiff_t(i)); + erase_inspector(i); continue; } auto& e = *e_; @@ -61,7 +53,7 @@ auto z = e.coord.z(); (void)ret; } if (!is_open) - inspectors.erase(inspectors.begin() + (ptrdiff_t)i); + erase_inspector(i); } } |