mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-31 07:30:03 +08:00
Merge remote-tracking branch 'origin/patch'
This commit is contained in:
@@ -243,7 +243,12 @@ public abstract class MultiStateDockingAction<T> extends DockingAction {
|
|||||||
|
|
||||||
public void setCurrentActionStateByUserData(T t) {
|
public void setCurrentActionStateByUserData(T t) {
|
||||||
for (ActionState<T> actionState : actionStates) {
|
for (ActionState<T> actionState : actionStates) {
|
||||||
if (actionState.getUserData() == t) {
|
|
||||||
|
// Note: most clients will pass a T that is already in our list. However, to be more
|
||||||
|
// flexible, such as for clients with a T class of String, we should have no
|
||||||
|
// problem using equals() here.
|
||||||
|
// if (actionState.getUserData() == t) {
|
||||||
|
if (actionState.getUserData().equals(t)) {
|
||||||
setCurrentActionState(actionState);
|
setCurrentActionState(actionState);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user