hide empty toolbars

This commit is contained in:
Dmitry Avdeev
2012-01-10 15:51:25 +04:00
parent 15c8e73fc7
commit 1e2e17345f
@@ -643,7 +643,7 @@ public class ActionToolbarImpl extends JPanel implements ActionToolbar {
public Dimension getPreferredSize() {
final ArrayList<Rectangle> bounds = new ArrayList<Rectangle>();
calculateBounds(new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE), bounds);
if (bounds.isEmpty()) return new Dimension(0, 0);
int xLeft = Integer.MAX_VALUE;
int yTop = Integer.MAX_VALUE;
int xRight = Integer.MIN_VALUE;