Browse Source

Object graph - bidirectional edges don't overlap anymore.

pull/15/head
mkonicek 15 years ago
parent
commit
90ef21633f
  1. 3
      src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/Layout/SplineRouting/RouteGraph/EdgeStartEnd.cs

3
src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/Layout/SplineRouting/RouteGraph/EdgeStartEnd.cs

@ -20,11 +20,12 @@ namespace Debugger.AddIn.Visualizers.Graph.SplineRouting
var other = obj as EdgeStartEnd; var other = obj as EdgeStartEnd;
if (other == null) if (other == null)
return false; return false;
return this.From == other.From && this.To == other.To; return (this.From == other.From && this.To == other.To) || (this.From == other.To && this.To == other.From);
} }
public override int GetHashCode() public override int GetHashCode()
{ {
// commutative
return this.From.GetHashCode() ^ this.To.GetHashCode(); return this.From.GetHashCode() ^ this.To.GetHashCode();
} }
} }

Loading…
Cancel
Save