1
0
mirror of synced 2025-01-31 03:53:44 +01:00

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

@ -1 +1 @@
Subproject commit 2158aa88dddb9f9f7789e2d6c00569cd22e7f40e
Subproject commit 2ccf828f79a30c8524ad79bbaea44f33e2d43227

@ -1 +1 @@
Subproject commit bcdd163f36876b785f54eb002d71445ee55396bf
Subproject commit 0154e71aca643c7d526831755b36e86d41ba0ba4

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();
}
);