mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
fixed excessive context changed calls by non visible windows
This commit is contained in:
parent
6ae0c1ce23
commit
13caf91a21
3 changed files with 13 additions and 0 deletions
|
@ -405,6 +405,11 @@ class DetachedWindowNode extends WindowNode {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
boolean isVisible() {
|
||||||
|
return window != null && window.isVisible();
|
||||||
|
}
|
||||||
|
|
||||||
void updateDialog() {
|
void updateDialog() {
|
||||||
|
|
||||||
if (window != null && childComp != null) {
|
if (window != null && childComp != null) {
|
||||||
|
|
|
@ -97,6 +97,11 @@ public class WindowActionManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
synchronized void contextChanged(ComponentPlaceholder placeHolder) {
|
synchronized void contextChanged(ComponentPlaceholder placeHolder) {
|
||||||
|
|
||||||
|
if (!node.isVisible()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
placeHolderForScheduledActionUpdate = placeHolder;
|
placeHolderForScheduledActionUpdate = placeHolder;
|
||||||
|
|
||||||
// Buffer the events, as they tend to come in 3s. That might not sound like alot, but
|
// Buffer the events, as they tend to come in 3s. That might not sound like alot, but
|
||||||
|
|
|
@ -38,6 +38,8 @@ public abstract class WindowNode extends Node {
|
||||||
|
|
||||||
abstract Container getContentPane();
|
abstract Container getContentPane();
|
||||||
|
|
||||||
|
abstract boolean isVisible();
|
||||||
|
|
||||||
void setToolBar(JComponent toolBar) {
|
void setToolBar(JComponent toolBar) {
|
||||||
Container rootPane = getContentPane();
|
Container rootPane = getContentPane();
|
||||||
if (rootPane == null) {
|
if (rootPane == null) {
|
||||||
|
@ -98,6 +100,7 @@ public abstract class WindowNode extends Node {
|
||||||
contextTypes = null;
|
contextTypes = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
toolBarPanel = null;
|
toolBarPanel = null;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue