fix: Multiple issues with provider load interfaces not working

This commit is contained in:
WerWolv
2025-02-15 11:13:22 +01:00
parent 83e0ce0042
commit 5542c0bc00
3 changed files with 5 additions and 4 deletions

View File

@@ -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;

View File

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

View File

@@ -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() {