From 3276ad9979e733bc8179a671dc893bb3a58f6bb9 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sun, 29 Nov 2020 01:17:54 +0100 Subject: [PATCH] Open file dialog to not pop up if hex view wasn't open --- source/views/view_hexeditor.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/views/view_hexeditor.cpp b/source/views/view_hexeditor.cpp index d21559ff4..07e13f1c0 100644 --- a/source/views/view_hexeditor.cpp +++ b/source/views/view_hexeditor.cpp @@ -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"); }); }