From 0184bf9a7de45dd092b2c4cb48979f16ac3b2f79 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sat, 3 Aug 2024 17:00:09 +0200 Subject: [PATCH] impr: Only mark providers dirty when they're not dirty already --- lib/libimhex/source/api/imhex_api.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/libimhex/source/api/imhex_api.cpp b/lib/libimhex/source/api/imhex_api.cpp index 4d48152c2..2233c14d8 100644 --- a/lib/libimhex/source/api/imhex_api.cpp +++ b/lib/libimhex/source/api/imhex_api.cpp @@ -337,8 +337,11 @@ namespace hex { } void markDirty() { - get()->markDirty(); - EventProviderDirtied::post(get()); + const auto provider = get(); + if (!provider->isDirty()) { + provider->markDirty(); + EventProviderDirtied::post(provider); + } } void resetDirty() {