Remove trans also from Building

parent 0803b675
Pipeline #21039 passed with stages
in 9 minutes and 20 seconds
This diff is collapsed.
...@@ -262,6 +262,8 @@ public: ...@@ -262,6 +262,8 @@ public:
// ------------------------------------ // ------------------------------------
bool AddCrossing(Crossing* line); bool AddCrossing(Crossing* line);
bool RemoveTransition(Transition * line);
bool AddTransition(Transition* line); bool AddTransition(Transition* line);
bool AddHline(Hline* line); bool AddHline(Hline* line);
......
...@@ -251,16 +251,19 @@ bool SubRoom::AddCrossing(Crossing* line) ...@@ -251,16 +251,19 @@ bool SubRoom::AddCrossing(Crossing* line)
bool SubRoom::RemoveTransition(Transition * t) bool SubRoom::RemoveTransition(Transition * t)
{ {
auto it = std::find(_transitions.begin(), _transitions.end(), t); auto it = std::find(_transitions.begin(), _transitions.end(), t);
// if (it != _transitions.end()) { if (it != _transitions.end()) {
// _transitions.erase(it); // std::cout << "subroom remove transition "<< t->GetID() << ", " << t->GetUniqueID()<< "\n";
_transitions.erase(it);
RemoveGoalID(t->GetUniqueID()); RemoveGoalID(t->GetUniqueID());
// return true; // std::cout << "enter Remove Transitions with " << _transitions.size() << "\n";
// } return true;
}
// std::cout << "2 enter Remove Transitions with " << _transitions.size() << "\n";
return false; return false;
} }
bool SubRoom::AddTransition(Transition* line) bool SubRoom::AddTransition(Transition* line)
{ {
std::cout << "subroom addtransition "<< line->GetID() << ", " << line->GetUniqueID()<< "\n"; // std::cout << "subroom addtransition "<< line->GetID() << ", " << line->GetUniqueID()<< "\n";
_transitions.push_back(line); _transitions.push_back(line);
_goalIDs.push_back(line->GetUniqueID()); _goalIDs.push_back(line->GetUniqueID());
return true; return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment