mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-129015 - assert: AbstractPopup.show
This commit is contained in:
@@ -223,13 +223,13 @@ public class PopupPositionManager {
|
||||
}
|
||||
|
||||
if (popupRect != null) {
|
||||
if (popup.isVisible()) {
|
||||
popup.setLocation(new Point(r.x, r.y));
|
||||
}
|
||||
else {
|
||||
if (popup.canShow()) {
|
||||
final Point p = new Point(r.x - myRelativeOnScreen.x, r.y - myRelativeOnScreen.y);
|
||||
popup.show(new RelativePoint(myRelativeTo, p));
|
||||
}
|
||||
else {
|
||||
popup.setLocation(new Point(r.x, r.y));
|
||||
}
|
||||
}
|
||||
else {
|
||||
// ok, popup does not fit, will try to resize it
|
||||
@@ -244,13 +244,13 @@ public class PopupPositionManager {
|
||||
d.width, d.height));
|
||||
|
||||
popup.setSize(crop.getSize());
|
||||
if (popup.isVisible()) {
|
||||
popup.setLocation(crop.getLocation());
|
||||
}
|
||||
else {
|
||||
if (popup.canShow()) {
|
||||
popup.show(new RelativePoint(myRelativeTo, new Point(crop.getLocation().x - myRelativeOnScreen.x,
|
||||
crop.getLocation().y - myRelativeOnScreen.y)));
|
||||
}
|
||||
else {
|
||||
popup.setLocation(crop.getLocation());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user