1
0
mirror of synced 2024-12-01 02:37:18 +01:00

fix: Byte type distribution and entropy slider not updating

This commit is contained in:
WerWolv 2024-02-23 18:44:41 +01:00
parent 026713750d
commit e7df0d201f

View File

@ -143,8 +143,15 @@ namespace hex::plugin::builtin {
class InformationByteAnalysis : public ContentRegistry::DataInformation::InformationSection {
public:
InformationByteAnalysis() : InformationSection("hex.builtin.information_section.info_analysis", "", true) { }
~InformationByteAnalysis() override = default;
InformationByteAnalysis() : InformationSection("hex.builtin.information_section.info_analysis", "", true) {
EventRegionSelected::subscribe(this, [this](const ImHexApi::HexEditor::ProviderRegion &region) {
m_byteTypesDistribution.setHandlePosition(region.getStartAddress());
m_chunkBasedEntropy.setHandlePosition(region.getStartAddress());
});
}
~InformationByteAnalysis() override {
EventRegionSelected::unsubscribe(this);
}
void process(Task &task, prv::Provider *provider, Region region) override {
if (m_inputChunkSize == 0)