mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 02:39:44 +02:00
Tests - fixed test failing to improper dialog parenting; updated dialog
parenting to avoid transient parents
This commit is contained in:
parent
cc6020736c
commit
22cc232210
3 changed files with 25 additions and 24 deletions
|
@ -1854,20 +1854,16 @@ public class DockingWindowManager implements PropertyChangeListener, Placeholder
|
|||
// as message dialogs will too be closed
|
||||
DockingDialog d = (DockingDialog) activeWindow;
|
||||
Window ancestor = SwingUtilities.getWindowAncestor(d);
|
||||
if (!d.isShowing()) {
|
||||
if (!ancestor.isShowing()) {
|
||||
return null;
|
||||
}
|
||||
if (d.isShowing() && isNonTransientWindow(d)) {
|
||||
return d;
|
||||
}
|
||||
|
||||
// The active window is not a suitable parent; try its parent
|
||||
if (ancestor.isShowing() && isNonTransientWindow(ancestor)) {
|
||||
return ancestor;
|
||||
}
|
||||
|
||||
DialogComponentProvider provider = d.getComponent();
|
||||
if (provider.isTransient()) {
|
||||
return ancestor;
|
||||
}
|
||||
|
||||
return d;
|
||||
return null;
|
||||
}
|
||||
|
||||
public ComponentProvider getActiveComponentProvider() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue