]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.g2d/src/org/simantics/g2d/diagram/handler/impl/PickContextImpl.java
Allow PickSorter access to the PickRequest used for pick operation
[simantics/platform.git] / bundles / org.simantics.g2d / src / org / simantics / g2d / diagram / handler / impl / PickContextImpl.java
index f6fd5fe6ddab9067960d168a1c487161b1065e4c..5d42cebb8970273841cdac2488f2fdf200a9e357 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2018 Association for Decentralized Information Management
+ * Copyright (c) 2007, 2020 Association for Decentralized Information Management
  * in Industry THTH ry.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -8,7 +8,7 @@
  *
  * Contributors:
  *     VTT Technical Research Centre of Finland - initial API and implementation
- *     Semantum Oy - gitlab #66 - parallel/spatial optimization
+ *     Semantum Oy - gitlab #60, #454 - parallel/spatial optimization
  *******************************************************************************/
 package org.simantics.g2d.diagram.handler.impl;
 
@@ -91,13 +91,13 @@ public class PickContextImpl implements PickContext {
 
                if (PERF) {
                        long endTime = System.nanoTime();
-                       LOGGER.info("[picked " + result.size() + " elements @ " + request.pickArea + "] total pick time : " + ((endTime - startTime)*1e-6));
+                       LOGGER.info("[picked {} elements @ {}] total pick time {} ms", result.size(), request.pickArea, ((endTime - startTime)*1e-6));
                }
 
                if (!result.isEmpty()) {
                        if (request.pickSorter != null) {
                                List<IElement> elems = new ArrayList<>(result);
-                               request.pickSorter.sort(elems);
+                               request.pickSorter.sort(request, elems);
                                finalResult.addAll(elems);
                        } else {
                                finalResult.addAll(result);