From 247ddb3a5c22878514d50303f9ba1e1c7a36cae3 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Wed, 3 Nov 2021 14:26:53 +0100 Subject: [PATCH] Suppress wrong error message in Katana::Session::_addMoveEvent(). * Bug: In Katana::Session::_addMoveEvent(), an error message is issued if the segment is not *already* in a Track. But, it is not the case for non-preferred Segment or reduced segment and it is valid. So suppress the message in those cases. --- katana/src/Session.cpp | 6 ++++-- katana/src/TrackSegment.cpp | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/katana/src/Session.cpp b/katana/src/Session.cpp index fceef318..83e42edd 100644 --- a/katana/src/Session.cpp +++ b/katana/src/Session.cpp @@ -459,8 +459,10 @@ namespace Katana { void Session::_addMoveEvent ( TrackElement* segment, Track* track, DbU::Unit axis ) { if (not segment->getTrack()) { - cerr << Bug( " Katana::Session::addMoveEvent() : %s is not yet in a track." - , getString(segment).c_str() ) << endl; + if (not segment->isNonPref() and not segment->isReduced()) { + cerr << Bug( " Katana::Session::addMoveEvent() : %s is not yet in a track." + , getString(segment).c_str() ) << endl; + } } else { _addRemoveEvent( segment ); } diff --git a/katana/src/TrackSegment.cpp b/katana/src/TrackSegment.cpp index d725d2d5..938a3f02 100644 --- a/katana/src/TrackSegment.cpp +++ b/katana/src/TrackSegment.cpp @@ -1122,7 +1122,8 @@ namespace Katana { string s2 = " [" + DbU::getValueString(_sourceU) + ":" + DbU::getValueString(_targetU) + "]" + " " + DbU::getValueString(_targetU-_sourceU) - + " " + getString(_dogLegLevel) + + " " + getString(_dogLegLevel) + " " + + ((isNonPref() ) ? "P" : "-") + ((isRouted() ) ? "R" : "-") + ((isSlackened() ) ? "S" : "-") + ((_track ) ? "T" : "-")