mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-28 17:11:11 -09:00
GP-1619 - Fixed bug that caused some MultiStateDockinActions to get called twice when clicked
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -17,19 +16,20 @@
|
||||
package ghidra.feature.vt.gui.actions;
|
||||
|
||||
import static ghidra.feature.vt.gui.actions.TableSelectionTrackingState.*;
|
||||
import ghidra.feature.vt.gui.plugin.VTPlugin;
|
||||
import ghidra.feature.vt.gui.provider.matchtable.VTMatchTableProvider;
|
||||
import ghidra.util.HelpLocation;
|
||||
|
||||
import javax.swing.Icon;
|
||||
|
||||
import resources.ResourceManager;
|
||||
import docking.action.ToolBarData;
|
||||
import docking.menu.ActionState;
|
||||
import docking.menu.MultiStateDockingAction;
|
||||
import docking.widgets.EventTrigger;
|
||||
import ghidra.feature.vt.gui.plugin.VTPlugin;
|
||||
import ghidra.feature.vt.gui.provider.matchtable.VTMatchTableProvider;
|
||||
import ghidra.util.HelpLocation;
|
||||
import resources.ResourceManager;
|
||||
|
||||
public class MatchTableSelectionAction extends MultiStateDockingAction<TableSelectionTrackingState> {
|
||||
public class MatchTableSelectionAction
|
||||
extends MultiStateDockingAction<TableSelectionTrackingState> {
|
||||
|
||||
private static final String MENU_GROUP = VTPlugin.VT_SETTINGS_MENU_GROUP;
|
||||
|
||||
@@ -44,7 +44,6 @@ public class MatchTableSelectionAction extends MultiStateDockingAction<TableSele
|
||||
setToolBarData(new ToolBarData(null, MENU_GROUP));
|
||||
setDescription("Adjust the Apply Mark-up Settings for Applying Matches");
|
||||
setEnabled(true);
|
||||
setPerformActionOnPrimaryButtonClick(false); // pressing button shows drop-down
|
||||
|
||||
HelpLocation helpLocation =
|
||||
new HelpLocation("VersionTrackingPlugin", "Match_Table_Selection");
|
||||
@@ -55,17 +54,17 @@ public class MatchTableSelectionAction extends MultiStateDockingAction<TableSele
|
||||
Icon trackRowIndexSelectionIcon = ResourceManager.loadImage("images/table_gear.png");
|
||||
|
||||
ActionState<TableSelectionTrackingState> trackSelectedIndexActionState =
|
||||
new ActionState<TableSelectionTrackingState>("Track Selected Index",
|
||||
new ActionState<>("Track Selected Index",
|
||||
trackRowIndexSelectionIcon, MAINTAIN_SELECTED_ROW_INDEX);
|
||||
trackSelectedIndexActionState.setHelpLocation(helpLocation);
|
||||
|
||||
ActionState<TableSelectionTrackingState> trackMatchSelectionActionState =
|
||||
new ActionState<TableSelectionTrackingState>("Track Selected Match",
|
||||
new ActionState<>("Track Selected Match",
|
||||
trackMatchSelectionIcon, MAINTAIN_SELECTED_ROW_VALUE);
|
||||
trackMatchSelectionActionState.setHelpLocation(helpLocation);
|
||||
|
||||
ActionState<TableSelectionTrackingState> noSelectionTrackingActionState =
|
||||
new ActionState<TableSelectionTrackingState>("No Selection Tracking",
|
||||
new ActionState<>("No Selection Tracking",
|
||||
noSelectionTrackingIcon, NO_SELECTION_TRACKING);
|
||||
noSelectionTrackingActionState.setHelpLocation(helpLocation);
|
||||
|
||||
|
||||
@@ -15,12 +15,8 @@
|
||||
*/
|
||||
package ghidra.feature.vt.gui.provider.functionassociation;
|
||||
|
||||
import static ghidra.feature.vt.api.impl.VTChangeManager.DOCR_VT_ASSOCIATION_STATUS_CHANGED;
|
||||
import static ghidra.feature.vt.api.impl.VTChangeManager.DOCR_VT_MATCH_ADDED;
|
||||
import static ghidra.feature.vt.api.impl.VTChangeManager.DOCR_VT_MATCH_DELETED;
|
||||
import static ghidra.feature.vt.gui.provider.functionassociation.FilterSettings.SHOW_ALL;
|
||||
import static ghidra.feature.vt.gui.provider.functionassociation.FilterSettings.SHOW_UNACCEPTED;
|
||||
import static ghidra.feature.vt.gui.provider.functionassociation.FilterSettings.SHOW_UNMATCHED;
|
||||
import static ghidra.feature.vt.api.impl.VTChangeManager.*;
|
||||
import static ghidra.feature.vt.gui.provider.functionassociation.FilterSettings.*;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
@@ -156,6 +152,7 @@ public class VTFunctionAssociationProvider extends ComponentProviderAdapter
|
||||
destinationFunctionsModel.setFilterSettings(filterSettings);
|
||||
}
|
||||
};
|
||||
|
||||
filterAction.setHelpLocation(new HelpLocation("VersionTrackingPlugin", "Functions_Filter"));
|
||||
|
||||
Icon allFunctionsIcon = ResourceManager.loadImage("images/function.png");
|
||||
|
||||
Reference in New Issue
Block a user