mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-169849 Can't undo in Find in Path
This commit is contained in:
@@ -173,7 +173,6 @@ public class FindPopupPanel extends JBPanel implements FindUI, DataProvider {
|
||||
.setResizable(true)
|
||||
.setMayBeParent(true)
|
||||
.setCancelOnClickOutside(true)
|
||||
.setModalContext(false)
|
||||
.setRequestFocus(true)
|
||||
.setCancelCallback(() -> {
|
||||
if (!myCanClose.get()) return false;
|
||||
|
||||
+6
-13
@@ -250,6 +250,11 @@ public final class IdeKeyEventDispatcher implements Disposable {
|
||||
* @throws IllegalArgumentException if {@code component} is {@code null}.
|
||||
*/
|
||||
public static boolean isModalContext(@NotNull Component component) {
|
||||
JBPopup popup = component instanceof JComponent ? (JBPopup)((JComponent)component).getRootPane().getClientProperty(JBPopup.KEY) : null;
|
||||
if (popup != null) {
|
||||
return popup.isModalContext();
|
||||
}
|
||||
|
||||
Window window = UIUtil.getWindow(component);
|
||||
|
||||
if (window instanceof IdeFrameImpl) {
|
||||
@@ -271,19 +276,7 @@ public final class IdeKeyEventDispatcher implements Disposable {
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean isFloatingDecorator = window instanceof FloatingDecorator;
|
||||
|
||||
boolean isPopup = !(component instanceof JFrame) && !(component instanceof JDialog);
|
||||
if (isPopup) {
|
||||
if (component instanceof JWindow) {
|
||||
JBPopup popup = (JBPopup)((JWindow)component).getRootPane().getClientProperty(JBPopup.KEY);
|
||||
if (popup != null) {
|
||||
return popup.isModalContext();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return !isFloatingDecorator;
|
||||
return !(window instanceof FloatingDecorator);
|
||||
}
|
||||
|
||||
private boolean inWaitForSecondStrokeState() {
|
||||
|
||||
Reference in New Issue
Block a user