mirror of
https://github.com/qgis/QGIS.git
synced 2025-11-30 00:04:58 -05:00
Currently, we pass the frame duration as a QgsInterval and use the average duration of a month or year during the animation, for instance, 30 days rather than a month. This makes it impossible to have an animation that displays on a particular day each month, as the day in the next month will change depending on the number of days in the previous month. This changes QgsTemporalNavigationObject to take the time step and time step unit as separate arguments. The settings in QgsTemporalUtils::exportAnimation are left unchanged, because in this case the user interface is already set up to use an interval. If the time step has a fractional value, the frame duration is calculated using a QgsInterval as before. If it has an integer value, the calculation uses QDateTime to advance by the specified time step instead. So a value of 1.5 months results in a frame duration of 45 days, but a value of 1 month will result in a duration that depends on the length of the current month. Fixes #37829.