diff --git a/dev/src/imbind.cpp b/dev/src/imbind.cpp index 1cdc5169..6f9a1b32 100644 --- a/dev/src/imbind.cpp +++ b/dev/src/imbind.cpp @@ -61,6 +61,7 @@ enum Nesting { N_DRAG_DROP_SOURCE, N_DRAG_DROP_TARGET, N_TABLE, + N_DISABLED, }; vector nstack; @@ -218,6 +219,9 @@ void NPop(VM &vm, Nesting n) { case N_TABLE: ImGui::EndTable(); break; + case N_DISABLED: + ImGui::EndDisabled(); + break; } // If this was indeed the item we're looking for, we can stop popping. if (tn == n) break; @@ -1566,13 +1570,14 @@ nfr("disabled_start", "disabled", "B", "", IsInit(vm); const auto disabled = Pop(sp).True(); ImGui::BeginDisabled(disabled); + NPush(N_DISABLED); }); nfr("disabled_end", "", "", "", "", [](StackPtr &, VM &vm) { IsInit(vm); - ImGui::EndDisabled(); + NPop(vm, N_DISABLED); }); nfr("button_repeat_start", "repeat", "B", "",