fix: Dangerous function call popup not showing up

This commit is contained in:
WerWolv
2023-05-02 20:34:37 +02:00
parent a33c7135d1
commit 0c8b3e31e7
3 changed files with 3 additions and 7 deletions

View File

@@ -193,16 +193,12 @@ namespace hex::plugin::builtin {
}
}
if (this->m_dangerousFunctionCalled && !ImGui::IsPopupOpen(View::toWindowName("hex.builtin.view.pattern_editor.dangerous_function.name").c_str())) {
ImGui::OpenPopup(View::toWindowName("hex.builtin.view.pattern_editor.dangerous_function.name").c_str());
if (this->m_dangerousFunctionCalled && !ImGui::IsPopupOpen(ImGuiID(0), ImGuiPopupFlags_AnyPopup)) {
PopupQuestion::open("hex.builtin.view.pattern_editor.dangerous_function.desc"_lang,
[this] {
this->m_dangerousFunctionsAllowed = DangerousFunctionPerms::Allow;
ImGui::CloseCurrentPopup();
}, [this] {
this->m_dangerousFunctionsAllowed = DangerousFunctionPerms::Deny;
ImGui::CloseCurrentPopup();
}
);