Author: closettop_nightlybuild Date: 2012-12-26 16:45:49-0800 New Revision: 19903
Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/layout/ClassdiagramLayouter.java Log: [Issue 6450] Exception when layout a comment in Class Diagram IndexOutOfBoundsException when using "layout" with only a comment in a Class Diagram Contributed-by: elbedd Modified: trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/layout/ClassdiagramLayouter.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/layout/ClassdiagramLayouter.java?view=diff&pathrev=19903&r1=19902&r2=19903 ============================================================================== --- trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/layout/ClassdiagramLayouter.java (original) +++ trunk/src/argouml-app/src/org/argouml/uml/diagram/static_structure/layout/ClassdiagramLayouter.java 2012-12-26 16:45:49-0800 @@ -1,6 +1,6 @@ /* $Id$ ***************************************************************************** - * Copyright (c) 2009 Contributors - see below + * Copyright (c) 2009-2012 Contributors - see below * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -8,6 +8,7 @@ * * Contributors: * tfmorris + * Laurent Braud ***************************************************************************** * * Some portions of this file was previously release using the BSD License: @@ -579,7 +580,11 @@ node.getUpNodes().isEmpty() ? 0 : ((node.getUpNodes().get(0)).getRank()); - + // Issue 6450 + if (nodeRows.size() == 0) { + nodeRows.add(new NodeRow(0)); + } + // end Issue 6450 nodeRows.get(rowInd).addNode(node); } for (int row = 0; row < nodeRows.size();) { ------------------------------------------------------ http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=3039452 To unsubscribe from this discussion, e-mail: [[email protected]].
