فهرست منبع

Issue #1 nodes don't have a white background any more

jess 7 سال پیش
والد
کامیت
cc8b4c92e7
1فایلهای تغییر یافته به همراه8 افزوده شده و 7 حذف شده
  1. 8 7
      src/ui/view/MyCanvas.java

+ 8 - 7
src/ui/view/MyCanvas.java

@@ -555,12 +555,13 @@ public class MyCanvas extends JPanel implements MouseListener, MouseMotionListen
 			// Border Highlighting
 			if (showedInformation[3]) {
 				g2.setColor(cps.getBorderColor());
-				if (g2.getColor() != Color.WHITE) {
-					g2.fillRect((int) (cps.getPosition().x - controller.getScaleDiv2() - scalediv20 - 3),
-							(int) (cps.getPosition().y - controller.getScaleDiv2() - scalediv20 - 3),
-							(int) (controller.getScale() + ((scalediv20 + 3) * 2)),
-							(int) (controller.getScale() + ((scalediv20 + 3) * 2)));
-				}
+				if (!(cps instanceof CpsNode)){
+					//if (g2.getColor() != Color.WHITE) {
+						g2.fillRect((int) (cps.getPosition().x - controller.getScaleDiv2() - scalediv20 - 3),
+								(int) (cps.getPosition().y - controller.getScaleDiv2() - scalediv20 - 3),
+								(int) (controller.getScale() + ((scalediv20 + 3) * 2)),
+								(int) (controller.getScale() + ((scalediv20 + 3) * 2)));
+					}
 			}
 			// node image
 			if (cps instanceof CpsNode && (cps == tempCps || model.getSelectedCpsObject() == cps
@@ -744,7 +745,7 @@ public class MyCanvas extends JPanel implements MouseListener, MouseMotionListen
 	public void mouseReleased(MouseEvent e) {
 		x = e.getX();
 		y = e.getY();
-		
+
 		dragging = false;
 
 		if (drawEdge) {