Resize path panel correctly when removing a path.

This commit is contained in:
Holt59 2018-03-03 22:44:30 +01:00
parent 1653558f94
commit 2f1fa81a58

View File

@ -166,11 +166,12 @@ public class PathsPanel extends JPanel implements DrawingChangeListener, GraphCh
this.add(new PathPanel(path)); this.add(new PathPanel(path));
this.setVisible(true); this.setVisible(true);
this.revalidate(); this.revalidate();
this.repaint();
} }
protected void removePath(PathPanel panel) { protected void removePath(PathPanel panel) {
PathsPanel.this.remove(panel); PathsPanel.this.remove(panel);
PathsPanel.this.validate(); PathsPanel.this.revalidate();
PathsPanel.this.repaint(); PathsPanel.this.repaint();
if (this.getComponentCount() == 0) { if (this.getComponentCount() == 0) {
this.setVisible(false); this.setVisible(false);