1
0
mirror of synced 2024-11-13 18:50:53 +01:00

fix: Data inspector still displaying entries with no selection

This commit is contained in:
WerWolv 2022-10-11 20:18:16 +02:00
parent 16eb7b3dbd
commit 5312d6f9fa

View File

@ -19,11 +19,11 @@ namespace hex::plugin::builtin {
ViewDataInspector::ViewDataInspector() : View("hex.builtin.view.data_inspector.name") {
EventManager::subscribe<EventRegionSelected>(this, [this](Region region) {
auto provider = ImHexApi::Provider::get();
if (!ImHexApi::Provider::isValid() || region.address == (size_t)-1) {
if (!ImHexApi::Provider::isValid() || region == Region::Invalid()) {
this->m_validBytes = 0;
} else {
auto provider = ImHexApi::Provider::get();
this->m_validBytes = u64(provider->getActualSize() - region.address);
this->m_startAddress = region.address;
}