From fe86f69da313c451d1858bf28fe05d6f3b5d8f2b Mon Sep 17 00:00:00 2001 From: WerWolv Date: Mon, 18 Jul 2022 11:40:49 +0200 Subject: [PATCH] fix: Duplicate pattern data view entries when sorting the list Fixes #584 --- plugins/builtin/source/content/views/view_pattern_data.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/builtin/source/content/views/view_pattern_data.cpp b/plugins/builtin/source/content/views/view_pattern_data.cpp index eefcd815d..eb29ecc96 100644 --- a/plugins/builtin/source/content/views/view_pattern_data.cpp +++ b/plugins/builtin/source/content/views/view_pattern_data.cpp @@ -80,6 +80,7 @@ namespace hex::plugin::builtin { auto sortSpecs = ImGui::TableGetSortSpecs(); if (sortSpecs->SpecsDirty || sortedPatterns.empty()) { + sortedPatterns.clear(); std::transform(patterns.begin(), patterns.end(), std::back_inserter(sortedPatterns), [](const std::shared_ptr &pattern) { return pattern.get(); });