mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
fix: Multiple issues with provider load interfaces not working
This commit is contained in:
@@ -17,6 +17,7 @@ namespace hex::plugin::builtin {
|
||||
|
||||
ImVec2 getMinSize() const override { return { -1, -1 }; }
|
||||
ImVec2 getMaxSize() const override { return this->getMinSize(); }
|
||||
ImGuiWindowFlags getWindowFlags() const override { return ImGuiWindowFlags_AlwaysAutoResize; }
|
||||
|
||||
bool hasCloseButton() const override {
|
||||
return false;
|
||||
|
||||
@@ -463,16 +463,16 @@ namespace hex::plugin::builtin {
|
||||
|
||||
ImGui::PushItemWidth(300_scaled);
|
||||
if (ImGui::BeginListBox("hex.builtin.provider.disk.selected_disk"_lang)) {
|
||||
ImGui::PushID(1);
|
||||
for (const auto &[path, friendlyName] : m_availableDrives) {
|
||||
ImGui::PushID(path.c_str());
|
||||
if (ImGui::Selectable(friendlyName.c_str(), m_path == path)) {
|
||||
m_path = path;
|
||||
m_friendlyName = friendlyName;
|
||||
}
|
||||
ImGui::PopID();
|
||||
|
||||
ImGuiExt::InfoTooltip(path.c_str());
|
||||
}
|
||||
ImGui::PopID();
|
||||
|
||||
ImGui::EndListBox();
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
namespace hex::plugin::builtin {
|
||||
|
||||
ViewProviderSettings::ViewProviderSettings() : View::Modal("hex.builtin.view.provider_settings.name") {
|
||||
EventProviderOpened::subscribe(this, [this](const hex::prv::Provider *provider) {
|
||||
EventProviderCreated::subscribe(this, [this](const hex::prv::Provider *provider) {
|
||||
if (provider->hasLoadInterface() && !provider->shouldSkipLoadInterface())
|
||||
this->getWindowOpenState() = true;
|
||||
});
|
||||
@@ -28,7 +28,7 @@ namespace hex::plugin::builtin {
|
||||
}
|
||||
|
||||
ViewProviderSettings::~ViewProviderSettings() {
|
||||
EventProviderOpened::unsubscribe(this);
|
||||
EventProviderCreated::unsubscribe(this);
|
||||
}
|
||||
|
||||
void ViewProviderSettings::drawContent() {
|
||||
|
||||
Reference in New Issue
Block a user