Bug 508165 - When deleting selected subtitle layer it always deletes layer 0 instead.
Summary: When deleting selected subtitle layer it always deletes layer 0 instead.
Status: REPORTED
Alias: None
Product: kdenlive
Classification: Applications
Component: Title Clips & Subtitles (other bugs)
Version First Reported In: unspecified
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: Ron
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-08-12 17:00 UTC by Gabriel Gazzán
Modified: 2025-08-20 05:22 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Deleting a subtitle layer (251.38 KB, image/png)
2025-08-12 17:00 UTC, Gabriel Gazzán
Details
No space between "layer" and the layer number (28.71 KB, image/png)
2025-08-12 17:49 UTC, Gabriel Gazzán
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabriel Gazzán 2025-08-12 17:00:58 UTC
Created attachment 183994 [details]
Deleting a subtitle layer

In the Manage Subtitles window, when trying to delete the selected layer it always deletes layer 0 (and it informs so in the confirmation dialog).

The catch is that I've tried to reproduce it in (some) other locales, and it only happened with the Spanish, Italian and Polish UIs. 
Others (English, Catalan, French...) worked well.
Comment 1 Gabriel Gazzán 2025-08-12 17:49:23 UTC
Created attachment 183995 [details]
No space between "layer" and the layer number

I've found that in all locales where the problem is present, there is no space between the word "layer" and the layer number.
In my case (Spanish) I've chosen to name layers as "Layer S<number>" because that's the way they are show in the timeline header, and so the reason why there's no space between the constant text and the variable layer number there.

Maybe this is causing some confusion while deciding the number of the selected layer?
Comment 2 Ron 2025-08-18 13:41:39 UTC
Hi Gabriel,

There's actually quite a few bugs in this, and I've seen similar things with the en_AU locale.
For the moment, I wanted to check in on your real use case here - are you just trying to
delete layers after accidentally creating them with the 'drag down' feature that was included
when this landed, or are you really using subtitle layers in your projects?

The 25.08 release will include a safety catch that makes it harder to accidentally create a new
layer by dragging in the timeline which should solve the main problem - and this whole dialog
gets replaced in the new code I'm working on, which I'd like to have ready to land for 25.12.

Use of subtitle 'layers' in the current code was mostly a workaround for an implementation
detail, where how they were indexed didn't allow them to share the same start time - but ASS
layers mostly aren't very useful in practice unless you *actually* want overlapping/overstruck
text.

So this problem will go away when the new code lands - but if you really are using subtitle layers
deliberately, I'd like to know more about that to make sure your use case will be well supported.
Comment 3 Gabriel Gazzán 2025-08-18 16:07:49 UTC
Thanks Ron,
No, I was just testing the capabilities of subtitle layers to see if they allowed to create a video with several tracks of subtitles to accommodate different languages' subtitles (which they don't).

The new layers were directly created from the Manage Subtitles dialog, Layers and Content tab, and then deleted from there too.
Comment 4 Ron 2025-08-19 21:18:58 UTC
(In reply to Gabriel Gazzán from comment #3)
> Thanks Ron,
> No, I was just testing the capabilities of subtitle layers to see if they
> allowed to create a video with several tracks of subtitles to accommodate
> different languages' subtitles (which they don't).

Cool, thanks for clarifying that.

What you want is possible, and is more overtly supported in the new code that's coming,
but layers isn't what you want to do it.  You need to use separate subtitle files for each language,
which is supported in the UI as separate subtitle tracks - but only one can be 'active' at a time.

Go to Project->subtitles->manage subtitles->Files and click the "new file" button.

That will give you a new subtitle track you can use for a new language - and the dropdown
box in the track header to the left of the timeline will let you select the active track from
the set of available ones.

You can also (optionally) create a new track if/when you import a subtitle file.

The new code should make this a bit easier to manage by showing you the full structure
and letting you directly access any or all of it.  See the screenshots here:
https://discuss.kde.org/t/how-to-view-all-subtitle-lines-in-a-separate-window-while-editing-video/31213/3

When you render your project, you can either embed all your subtitle files in it if you use mkv,
or ship them together with it, and players like vlc will let you select which subtitle track you want
displayed.
Comment 5 Gabriel Gazzán 2025-08-20 05:22:03 UTC
Thank you for the insights on the subject!

"When you render your project, you can either embed all your subtitle files in it if you use mkv,
or ship them together with it, and players like vlc will let you select which subtitle track you want
displayed."

You mean currently..?
How can you instruct Kdenlive to embed more than one subtitle file in the exported MKV file?