From 0676686bde3db6433d10af27861ade008a489072 Mon Sep 17 00:00:00 2001 From: Pablo Alvarez Lopez Date: Wed, 15 Jan 2025 08:11:17 +0100 Subject: [PATCH] Fixed error writing period introduced in 9ba919590f6c5998b403cc5a52bb1a70355d8e68. Refs #457 --- src/netedit/elements/additional/GNEDetector.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/netedit/elements/additional/GNEDetector.cpp b/src/netedit/elements/additional/GNEDetector.cpp index 685866cd098..8be8fd675f1 100644 --- a/src/netedit/elements/additional/GNEDetector.cpp +++ b/src/netedit/elements/additional/GNEDetector.cpp @@ -324,7 +324,7 @@ GNEDetector::isDetectorValid(SumoXMLAttr key, const std::string& value) { void GNEDetector::writeDetectorValues(OutputDevice& device) const { - if (myPeriod != SUMOTime_MAX_PERIOD) { + if ((myPeriod > 0) && (myPeriod != SUMOTime_MAX_PERIOD)) { device.writeAttr(SUMO_ATTR_PERIOD, time2string(myPeriod)); } if (myAdditionalName.size() > 0) {