]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/modelBrowser/handlers/StandardCopyHandler.java
Removed trailing newline from clipboard text
[simantics/platform.git] / bundles / org.simantics.modeling.ui / src / org / simantics / modeling / ui / modelBrowser / handlers / StandardCopyHandler.java
index 05a698a1339629efb1f98fe049f629c358780b1d..e0c57a3d17ebd08a0f24a8eec6c86d0d86e53b77 100644 (file)
@@ -193,21 +193,23 @@ public class StandardCopyHandler extends AbstractHandler {
         Set<TreeItem> items = new THashSet<TreeItem>(selection.length);
         for (TreeItem item : selection)
             items.add(item);
+        boolean firstRow = true;
         for (TreeItem item : selection) {
+            if (!firstRow)
+                sb.append('\n');
+            firstRow = false;
             int cc = item.getParent().getColumnCount();
             int indent = indentLevel(item, items);
             for (int i = 0; i < indent; ++i)
                 sb.append('\t');
-            boolean first = true;
+            boolean firstColumn = true;
             for (int c = 0; c < cc; ++c) {
                 String ct = item.getText(c);
-                if (!first) {
+                if (!firstColumn)
                     sb.append('\t');
-                }
-                first = false;
+                firstColumn = false;
                 sb.append(ct);
             }
-            sb.append('\n');
         }
         return sb;
     }