clarified Vertex.Ordering, to approximate situation before 4d985afc0565, which is relevant for level arrangement;
authorwenzelm
Tue, 06 Jan 2015 23:35:57 +0100
changeset 59311 a269cc01e8eb
parent 59310 7cdabe4cec33
child 59312 c4b9b04bfc6d
clarified Vertex.Ordering, to approximate situation before 4d985afc0565, which is relevant for level arrangement;
src/Tools/Graphview/layout.scala
--- a/src/Tools/Graphview/layout.scala	Tue Jan 06 23:23:26 2015 +0100
+++ b/src/Tools/Graphview/layout.scala	Tue Jan 06 23:35:57 2015 +0100
@@ -27,8 +27,6 @@
     {
       def compare(v1: Vertex, v2: Vertex): Int =
         (v1, v2) match {
-          case (_: Node, _: Dummy) => -1
-          case (_: Dummy, _: Node) => 1
           case (Node(a), Node(b)) => Graph_Display.Node.Ordering.compare(a, b)
           case (Dummy(a1, a2, i), Dummy(b1, b2, j)) =>
             Graph_Display.Node.Ordering.compare(a1, b1) match {
@@ -39,6 +37,16 @@
                 }
               case ord => ord
             }
+          case (Node(a), Dummy(b, _, _)) =>
+            Graph_Display.Node.Ordering.compare(a, b) match {
+              case 0 => -1
+              case ord => ord
+            }
+          case (Dummy(a, _, _), Node(b)) =>
+            Graph_Display.Node.Ordering.compare(a, b) match {
+              case 0 => 1
+              case ord => ord
+            }
         }
     }
   }