Jelajahi Sumber

fixed bug concerning incorrect graph (moved hiding of graph to after resizing of the UnitGraph)

I. Dix 7 tahun lalu
induk
melakukan
df8d0d2f61
2 mengubah file dengan 3 tambahan dan 2 penghapusan
  1. 0 2
      src/ui/view/GUI.java
  2. 3 0
      src/ui/view/UnitGraph.java

+ 0 - 2
src/ui/view/GUI.java

@@ -1850,8 +1850,6 @@ public class GUI<E> implements CategoryListener {
         splitHolonElPro.setBottomComponent(scrollProperties);
         splitGraphHolonEl.setDividerLocation(150);
         splitGraphHolonEl.setTopComponent(scrollGraph);
-        // set scroll graph invisible until needed
-        scrollGraph.setVisible(false);
         splitGraphHolonEl.setBottomComponent(scrollElements);
         canvasSP.setViewportView(canvas);
         algorithmMenu.setBackground(new Color(240, 240, 240));

+ 3 - 0
src/ui/view/UnitGraph.java

@@ -552,6 +552,9 @@ public class UnitGraph extends JPanel implements MouseListener, MouseMotionListe
 			// Scale
 			scaleX = (this.getWidth() - (border * 2)) / width;
 			scaleY = (this.getHeight() - (border * 2)) / height;
+
+            // set the scroll graph invisible
+            this.getParent().getParent().setVisible(false);
 		}
 
 		// Scale