[openrtm-commit:03331] r836 - trunk/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/editor/figure
openrtm @ openrtm.org
openrtm @ openrtm.org
2018年 3月 31日 (土) 13:26:02 JST
Author: ga
Date: 2018-03-31 13:26:02 +0900 (Sat, 31 Mar 2018)
New Revision: 836
Modified:
trunk/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/editor/figure/ComponentLayout.java
Log:
Modified RTC display when port number is 0. #4493
Modified: trunk/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/editor/figure/ComponentLayout.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/editor/figure/ComponentLayout.java 2018-03-27 12:00:06 UTC (rev 835)
+++ trunk/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/editor/figure/ComponentLayout.java 2018-03-31 04:26:02 UTC (rev 836)
@@ -400,15 +400,13 @@
@Override
public Dimension getMinimumSize(IFigure container, int wHint, int hHint) {
- int portCount = Math.max(this.outportLayouter.getChildCount(container),
- this.inportLayouter.getChildCount(container));
- int ecCount = Math.max(this.ownEcLayouter.getChildCount(container),
- this.partEcLayouter.getChildCount(container));
+ int portCount = Math.max(this.outportLayouter.getChildCount(container), this.inportLayouter.getChildCount(container));
+ int ecCount = Math.max(this.ownEcLayouter.getChildCount(container), this.partEcLayouter.getChildCount(container));
+ portCount = Math.max(portCount, 1);
+ ecCount = Math.max(ecCount, 1);
- int height = ComponentEditPart.NONE_SPACE * 2 + MIN_HEIGHT
- + MIN_Component_INTERVAL * (portCount - 1);
- int width = ComponentEditPart.PORT_SPACE * 2 + MIN_WIDTH
- + MIN_Component_INTERVAL * (ecCount - 1);
+ int height = ComponentEditPart.NONE_SPACE * 2 + MIN_HEIGHT + MIN_Component_INTERVAL * (portCount - 1);
+ int width = ComponentEditPart.PORT_SPACE * 2 + MIN_WIDTH + MIN_Component_INTERVAL * (ecCount - 1);
width = Math.max(width, 111);
openrtm-commit メーリングリストの案内