mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-25 20:26:24 +08:00
GT-1 removed return value on setEnabled() in DockingAction
This commit is contained in:
+2
-1
@@ -305,7 +305,8 @@ public class TableComponentProvider<T> extends ComponentProviderAdapter
|
||||
return;
|
||||
}
|
||||
|
||||
boolean wasEnabled = selectionNavigationAction.setEnabled(false); // disable navigation events from updates
|
||||
boolean wasEnabled = selectionNavigationAction.isEnabled();
|
||||
selectionNavigationAction.setEnabled(false); // disable navigation events from updates
|
||||
|
||||
int[] selectedRows = threadedTable.getSelectedRows();
|
||||
|
||||
|
||||
+2
-3
@@ -74,12 +74,11 @@ public abstract class AbstractSelectionNavigationAction extends ToggleDockingAct
|
||||
|
||||
@Override
|
||||
// overridden to toggle the selection listener when the action is disabled
|
||||
public boolean setEnabled(boolean enable) {
|
||||
boolean oldValue = super.setEnabled(enable);
|
||||
public void setEnabled(boolean enable) {
|
||||
super.setEnabled(enable);
|
||||
|
||||
boolean installListener = enable && isSelected();
|
||||
toggleSelectionListening(installListener);
|
||||
return oldValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -123,9 +123,8 @@ public class DockingActionProxy
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setEnabled(boolean newValue) {
|
||||
boolean oldValue = dockingAction.setEnabled(newValue);
|
||||
return oldValue;
|
||||
public void setEnabled(boolean newValue) {
|
||||
dockingAction.setEnabled(newValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -217,13 +217,12 @@ public abstract class DockingAction implements DockingActionIf {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setEnabled(boolean newValue) {
|
||||
public void setEnabled(boolean newValue) {
|
||||
if (isEnabled == newValue) {
|
||||
return isEnabled;
|
||||
return;
|
||||
}
|
||||
isEnabled = newValue;
|
||||
firePropertyChanged(ENABLEMENT_PROPERTY, !isEnabled, isEnabled);
|
||||
return !isEnabled;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -113,9 +113,8 @@ public interface DockingActionIf extends HelpDescriptor {
|
||||
* Enables or disables the action
|
||||
*
|
||||
* @param newValue true to enable the action, false to disable it
|
||||
* @return the enabled value of the action after this call
|
||||
*/
|
||||
public boolean setEnabled(boolean newValue);
|
||||
public void setEnabled(boolean newValue);
|
||||
|
||||
/**
|
||||
* Sets whether or not this action should be activated using the default tool context if the
|
||||
|
||||
Reference in New Issue
Block a user