You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Ensure SetJson() method recalculates project duration (min/max times)
This commit is contained in:
@@ -812,6 +812,7 @@ void Timeline::calculate_max_duration() {
|
||||
// If no clips or effects exist, set min_time to 0
|
||||
if (clips.empty() && effects.empty()) {
|
||||
min_time = 0.0;
|
||||
max_time = 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1302,6 +1303,10 @@ void Timeline::SetJsonValue(const Json::Value root) {
|
||||
preview_width = info.width;
|
||||
preview_height = info.height;
|
||||
|
||||
// Resort (and recalculate min/max duration)
|
||||
sort_clips();
|
||||
sort_effects();
|
||||
|
||||
// Re-open if needed
|
||||
if (was_open)
|
||||
Open();
|
||||
|
||||
Reference in New Issue
Block a user