GP-6033 - Version Tracking - Fixed filter icon that was not updating

correctly
This commit is contained in:
dragonmacher 2025-09-30 16:29:54 -04:00
parent 7b50970725
commit e8c7f70cbd
4 changed files with 6 additions and 15 deletions

View file

@ -89,7 +89,6 @@ icon.version.tracking.markup.status.dont.know = unknown.gif
icon.version.tracking.markup.status.failed = edit-delete.png icon.version.tracking.markup.status.failed = edit-delete.png
icon.version.tracking.markup.status.conflict = cache.png icon.version.tracking.markup.status.conflict = cache.png
icon.version.tracking.filter = view-filter.png
icon.version.tracking.empty = EmptyIcon16.gif icon.version.tracking.empty = EmptyIcon16.gif
icon.version.tracking.function.filter.all = function.png icon.version.tracking.function.filter.all = function.png

View file

@ -734,7 +734,7 @@
</P> </P>
<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 the
primary text filter will show the ancillary filters that are primary text filter will show the ancillary filters that are
available. You can apply an ancillary filter by removing the check mark from its available. You can apply an ancillary filter by removing the check mark from its
box and pressing the <B>Apply</B> or <B>OK</b> button. box and pressing the <B>Apply</B> or <B>OK</b> button.

View file

@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -35,8 +35,6 @@ public abstract class AncillaryFilterDialogComponentProvider<T>
protected final VTController controller; protected final VTController controller;
private final FilterDialogModel<T> dialogModel; private final FilterDialogModel<T> dialogModel;
private Boolean isFiltered;
protected AncillaryFilterDialogComponentProvider(VTController controller, String title, protected AncillaryFilterDialogComponentProvider(VTController controller, String title,
FilterDialogModel<T> dialogModel) { FilterDialogModel<T> dialogModel) {
super(title); 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() { public boolean isFiltered() {
if (isFiltered != null) { boolean isFiltered = false;
return isFiltered;
}
isFiltered = Boolean.FALSE;
for (Filter<T> filter : ancillaryFilters) { for (Filter<T> filter : ancillaryFilters) {
FilterShortcutState state = filter.getFilterShortcutState(); FilterShortcutState state = filter.getFilterShortcutState();
if (state != FilterShortcutState.ALWAYS_PASSES) { if (state != FilterShortcutState.ALWAYS_PASSES) {
@ -88,7 +82,6 @@ public abstract class AncillaryFilterDialogComponentProvider<T>
protected void dialogShown() { protected void dialogShown() {
dialogModel.dialogVisibilityChanged(true); dialogModel.dialogVisibilityChanged(true);
originalState = getCurrentState(); originalState = getCurrentState();
isFiltered = null;
} }
@Override @Override

View file

@ -78,7 +78,6 @@ public class VTMarkupItemsTableProvider extends ComponentProviderAdapter
private static final Icon SHOW_LISTINGS_ICON = private static final Icon SHOW_LISTINGS_ICON =
new GIcon("icon.version.tracking.action.show.listings"); 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 static final String SHOW_COMPARE_ACTION_GROUP = "A9_ShowCompare"; // "A9_" forces to right of other dual view actions in toolbar.
private final VTController controller; private final VTController controller;
@ -420,7 +419,7 @@ public class VTMarkupItemsTableProvider extends ComponentProviderAdapter
nameFilterPanel.getAccessibleContext().setAccessibleName("Name Filter"); nameFilterPanel.getAccessibleContext().setAccessibleName("Name Filter");
parentPanel.add(nameFilterPanel, BorderLayout.CENTER); parentPanel.add(nameFilterPanel, BorderLayout.CENTER);
ancillaryFilterButton = new JButton(FILTER_ICON); ancillaryFilterButton = new JButton(UNFILTERED_ICON);
ancillaryFilterButton.getAccessibleContext().setAccessibleName("Ancillary"); ancillaryFilterButton.getAccessibleContext().setAccessibleName("Ancillary");
ancillaryFilterButton ancillaryFilterButton
.addActionListener(e -> tool.showDialog(ancillaryFilterDialog, component)); .addActionListener(e -> tool.showDialog(ancillaryFilterDialog, component));