mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-317864 Fix coordinate equality in SimpleToolWindowPanel
The "excellent" Swing API strikes again: x is integer, but getX is floating-point. Of course we don't want to use equality on floating-point numbers. GitOrigin-RevId: 3bdac7537a157911cf7e7e89360e9dbcd28d1104
This commit is contained in:
committed by
intellij-monorepo-bot
parent
964b21ede4
commit
f503db70f5
@@ -259,7 +259,7 @@ public class SimpleToolWindowPanel extends JBPanelWithEmptyText implements Quick
|
||||
}
|
||||
var expectedCoordinate = (myVertical ? toolbar.getHeight() : toolbar.getWidth()) + GAP;
|
||||
var paneLocation = SwingUtilities.convertPoint(component.getParent(), component.getLocation(), this);
|
||||
var actualCoordinate = myVertical ? paneLocation.getY() : paneLocation.getX();
|
||||
var actualCoordinate = myVertical ? paneLocation.y : paneLocation.x;
|
||||
return expectedCoordinate == actualCoordinate;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user