mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 21:47:40 -05:00
fix: Data inspector not updating correctly when data has changed
Fixes #1545
This commit is contained in:
@@ -24,7 +24,6 @@ namespace hex::plugin::builtin {
|
||||
ViewDataInspector::ViewDataInspector() : View::Window("hex.builtin.view.data_inspector.name", ICON_VS_INSPECT) {
|
||||
// Handle region selection
|
||||
EventRegionSelected::subscribe(this, [this](const auto ®ion) {
|
||||
|
||||
// Save current selection
|
||||
if (!ImHexApi::Provider::isValid() || region == Region::Invalid()) {
|
||||
m_validBytes = 0;
|
||||
@@ -39,6 +38,11 @@ namespace hex::plugin::builtin {
|
||||
m_shouldInvalidate = true;
|
||||
});
|
||||
|
||||
EventDataChanged::subscribe(this, [this](const auto &provider) {
|
||||
if (provider == m_selectedProvider)
|
||||
m_shouldInvalidate = true;
|
||||
});
|
||||
|
||||
EventProviderClosed::subscribe(this, [this](const auto*) {
|
||||
m_selectedProvider = nullptr;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user