Open file dialog to not pop up if hex view wasn't open

This commit is contained in:
WerWolv 2020-11-29 01:17:54 +01:00
parent 0890043bf4
commit 3276ad9979
1 changed files with 4 additions and 0 deletions

View File

@ -168,6 +168,7 @@ namespace hex {
if (ImGui::BeginMenu("File")) {
if (ImGui::MenuItem("Open File...", "CTRL + O")) {
this->getWindowOpenState() = true;
View::doLater([]{ ImGui::OpenPopup("Open File"); });
}
@ -182,6 +183,7 @@ namespace hex {
if (ImGui::BeginMenu("Import...")) {
if (ImGui::MenuItem("Base64 File")) {
this->getWindowOpenState() = true;
View::doLater([]{ ImGui::OpenPopup("Open Base64 File"); });
}
@ -220,10 +222,12 @@ namespace hex {
ImGui::Separator();
if (ImGui::MenuItem("Search", "CTRL + F")) {
this->getWindowOpenState() = true;
View::doLater([]{ ImGui::OpenPopup("Search"); });
}
if (ImGui::MenuItem("Goto", "CTRL + G")) {
this->getWindowOpenState() = true;
View::doLater([]{ ImGui::OpenPopup("Goto"); });
}