Ghidra is a software reverse engineering (SRE) framework
GP-6033 - Version Tracking - Fixed filter icon that was not updating correctly
dragonmachere8c7f70cbda7
diff --git a/Ghidra/Features/VersionTracking/data/version.tracking.theme.properties b/Ghidra/Features/VersionTracking/data/version.tracking.theme.propertiesindex 26da800df6..3fb7ab7ee7 100644--- a/Ghidra/Features/VersionTracking/data/version.tracking.theme.properties+++ b/Ghidra/Features/VersionTracking/data/version.tracking.theme.properties@@ -89,7 +89,6 @@ icon.version.tracking.markup.status.dont.know = unknown.gificon.version.tracking.markup.status.failed = edit-delete.pngicon.version.tracking.markup.status.conflict = cache.png-icon.version.tracking.filter = view-filter.pngicon.version.tracking.empty = EmptyIcon16.gificon.version.tracking.function.filter.all = function.pngdiff --git a/Ghidra/Features/VersionTracking/src/main/help/help/topics/VersionTrackingPlugin/providers/VT_Markup_Table.html b/Ghidra/Features/VersionTracking/src/main/help/help/topics/VersionTrackingPlugin/providers/VT_Markup_Table.htmlindex d6a0e6e640..e09cfd863f 100644--- a/Ghidra/Features/VersionTracking/src/main/help/help/topics/VersionTrackingPlugin/providers/VT_Markup_Table.html+++ b/Ghidra/Features/VersionTracking/src/main/help/help/topics/VersionTrackingPlugin/providers/VT_Markup_Table.html@@ -734,7 +734,7 @@</P><P>- The <img src="images/view-filter.png" border="1"/> button to the right of the+ The <img src="icon.version.tracking.unfiltered" border="1"/> button to the right of theprimary text filter will show the ancillary filters that areavailable. You can apply an ancillary filter by removing the check mark from itsbox and pressing the <B>Apply</B> or <B>OK</b> button.diff --git a/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/filters/AncillaryFilterDialogComponentProvider.java b/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/filters/AncillaryFilterDialogComponentProvider.javaindex fc1a0da451..fee64ad76e 100644--- a/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/filters/AncillaryFilterDialogComponentProvider.java+++ b/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/filters/AncillaryFilterDialogComponentProvider.java@@ -4,9 +4,9 @@* Licensed under the Apache License, Version 2.0 (the "License");* you may not use this file except in compliance with the License.* You may obtain a copy of the License at- *+ ** http://www.apache.org/licenses/LICENSE-2.0- *+ ** Unless required by applicable law or agreed to in writing, software* distributed under the License is distributed on an "AS IS" BASIS,* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.@@ -35,8 +35,6 @@ public abstract class AncillaryFilterDialogComponentProvider<T>protected final VTController controller;private final FilterDialogModel<T> dialogModel;- private Boolean isFiltered;-protected AncillaryFilterDialogComponentProvider(VTController controller, String title,FilterDialogModel<T> dialogModel) {super(title);@@ -58,14 +56,10 @@ public abstract class AncillaryFilterDialogComponentProvider<T>}/**- * Returns true if any of the filters managed by this dialog are not in their default state.+ * {@return true if any of the filters managed by this dialog are not in their default state}*/public boolean isFiltered() {- if (isFiltered != null) {- return isFiltered;- }-- isFiltered = Boolean.FALSE;+ boolean isFiltered = false;for (Filter<T> filter : ancillaryFilters) {FilterShortcutState state = filter.getFilterShortcutState();if (state != FilterShortcutState.ALWAYS_PASSES) {@@ -88,7 +82,6 @@ public abstract class AncillaryFilterDialogComponentProvider<T>protected void dialogShown() {dialogModel.dialogVisibilityChanged(true);originalState = getCurrentState();- isFiltered = null;}@Overridediff --git a/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/provider/markuptable/VTMarkupItemsTableProvider.java b/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/provider/markuptable/VTMarkupItemsTableProvider.javaindex 2f24f2ac6e..c115cb3683 100644--- a/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/provider/markuptable/VTMarkupItemsTableProvider.java+++ b/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/provider/markuptable/VTMarkupItemsTableProvider.java@@ -78,7 +78,6 @@ public class VTMarkupItemsTableProvider extends ComponentProviderAdapterprivate static final Icon SHOW_LISTINGS_ICON =new GIcon("icon.version.tracking.action.show.listings");- private static final Icon FILTER_ICON = new GIcon("icon.version.tracking.filter");private static final String SHOW_COMPARE_ACTION_GROUP = "A9_ShowCompare"; // "A9_" forces to right of other dual view actions in toolbar.private final VTController controller;@@ -420,7 +419,7 @@ public class VTMarkupItemsTableProvider extends ComponentProviderAdapternameFilterPanel.getAccessibleContext().setAccessibleName("Name Filter");parentPanel.add(nameFilterPanel, BorderLayout.CENTER);- ancillaryFilterButton = new JButton(FILTER_ICON);+ ancillaryFilterButton = new JButton(UNFILTERED_ICON);ancillaryFilterButton.getAccessibleContext().setAccessibleName("Ancillary");ancillaryFilterButton.addActionListener(e -> tool.showDialog(ancillaryFilterDialog, component));