Bug 462228 - Undo does not restore removed tracks if the user marked all tracks for deletion
Summary: Undo does not restore removed tracks if the user marked all tracks for deletion
Status: RESOLVED FIXED
Alias: None
Product: kdenlive
Classification: Applications
Component: Rendering & Export (other bugs)
Version First Reported In: 22.08.3
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-25 07:02 UTC by krzysztof.swiatek
Modified: 2022-11-25 07:32 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 22.12.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description krzysztof.swiatek 2022-11-25 07:02:06 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

In case user marks all tracks for deletion and attempts to undo this operation, the application will not restore any tracks. Should further undos affect the phantom clips (i.e. the clips that should have been restored on the removed tracks), kdenlive will freeze.


STEPS TO REPRODUCE
1. Open the application.
2. Put a video into the project bin.
3. Drag a video into the V1 track.
4. Drag a video into the V2 track.
5. Move both clips along the tracks.
6. Right-click on either track.
7. Select "Delete track..." from the menu.
8. Mark all tracks for deletion.
9. Press CTRL and Z at least 3 times.

OBSERVED RESULT
Kdenlive freezes.

EXPECTED RESULT
Kdenlive restores the deleted tracks and moves both clips onto their original position.

SOFTWARE/OS VERSIONS
Windows: 10
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 5.98.0 
Qt Version: 5.15.5

ADDITIONAL INFORMATION
Comment 1 Jean-Baptiste Mardelle 2022-11-25 07:15:41 UTC
Thanks for your report, working on a fix
Comment 2 Jean-Baptiste Mardelle 2022-11-25 07:32:08 UTC
Git commit 6d0b7533b28e356a9a62875ee0e56b63cb0bc9c7 by Jean-Baptiste Mardelle.
Committed on 25/11/2022 at 07:31.
Pushed by mardelle into branch 'release/22.12'.

Fix undo broken when trying to delete all tracks (don't allow it and fix the underlying bug)
FIXED-IN: 22.12.0

M  +13   -0    src/timeline2/view/dialogs/trackdialog.cpp
M  +2    -0    src/timeline2/view/timelinecontroller.cpp

https://invent.kde.org/multimedia/kdenlive/commit/6d0b7533b28e356a9a62875ee0e56b63cb0bc9c7