void SetLaneRoadMarkSOffsetCommand::undo() { mark_->setSOffset(oldSOffset_); setUndone(); }
/*! \brief * */ void MoveRoadSectionCommand::undo() { roadSection_->getParentRoad()->moveRoadSection(roadSection_, oldS_, sectionType_); setUndone(); }
void RemoveLaneCommand::undo() { Lane *lane; if (id_ < 0) { lane = laneSection_->getFirst(); int i; while (lane && ((i = lane->getId()) <= id_)) { lane->setId(i - 1); lane = laneSection_->getNextUpper(i); } } else { lane = laneSection_->getLast(); int i; while (lane && ((i = lane->getId()) >= id_)) { lane->setId(i + 1); lane = laneSection_->getNextLower(i); } } laneSection_->addLane(oldLane_); setUndone(); }
void InsertLaneCommand::undo() { laneSection_->removeLane(newLane_); if (id_ < 0) { for (int i = id_ - 1; i >= laneSection_->getRightmostLaneId(); i--) { Lane *lane = laneSection_->getLane(i); if (lane) { lane->setId(i+1); } } } else { for (int i = id_ + 1; i <= laneSection_->getLeftmostLaneId(); i++) { Lane *lane = laneSection_->getLane(i); if (lane) { lane->setId(i-1); } } } setUndone(); }
void InsertLaneWidthCommand::undo() { lane_->delWidthEntry(newLaneWidth_); setUndone(); }
/*! \brief Removes the TypeSection from the RSystemElementRoad. * * This also notifies the RSystemElementRoad. */ void AddTypeSectionCommand::undo() { // Reset // // road_->delTypeSection(newTypeSection_); setUndone(); }
/*! \brief Resets the Road Type of a TypeSection. */ void SetTypeTypeSectionCommand::undo() { // Reset // // typeSection_->setRoadType(oldRoadType_); setUndone(); }
/*! \brief Resets the Road Type of a TypeSection. */ void SetSpeedTypeSectionCommand::undo() { // Reset // // typeSection_->setSpeedRecord(oldSpeedRecord); setUndone(); }
/*! \brief Adds the TypeSection to the RSystemElementRoad. * * This also notifies the RSystemElementRoad. */ void DeleteTypeSectionCommand::undo() { if (!isValid()) return; // Reset // // road_->addTypeSection(deletedTypeSection_); setUndone(); }