Bug 494546 - When you rename an audio device and click apply the entered name is reset
Summary: When you rename an audio device and click apply the entered name is reset
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_pulseaudio (show other bugs)
Version: 6.2.0
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2024-10-11 15:34 UTC by medin
Modified: 2024-10-26 06:56 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description medin 2024-10-11 15:34:08 UTC
Steps:

1. Start Plasma settings and select Sound category
2. Click Rename Devices
3. Start typing a new name, a new icon "Apply" will appear
4. Click on it

Expected result:
Entered name should remain.

Observed result:
Entered name is reset.

NB: Truthfully having to click Apply then Save is not intuitive at all. And having that "Save" button at top is not consistent and hard to see, because we are used inside Plasma settings to always find "Apply" at right bottom.
Comment 1 Nate Graham 2024-10-11 16:54:34 UTC
Does it still happen if you rename a device, then either hit the return key or move focus somewhere else, and *then* click the Apply button?
Comment 2 medin 2024-10-11 20:06:46 UTC
(In reply to Nate Graham from comment #1)
> Does it still happen if you rename a device, then either hit the return key
> or move focus somewhere else, and *then* click the Apply button?

What happens is the following:

e.g I want to change my device named "USB Audio Device Analog Stereo" to "ZATEC ext USB"

1. When I open Rename Devices page, I see that "USB Audio Device Analog Stereo" grayed in the background, and when I left-click inside it gives an empty text field.
2. If I type "ZATEC ext USB" then click Apply icon, or hit Enter key, or move focus to another text field (without clicking on Apply), it immediately replaces the typed text with "USB Audio Device Analog Stereo" (not grayed but like it was typed)
3. Then, if I click on Save (even if the text field shows that it contains "USB Audio Device Analog Stereo"), it reloads the device with the correct new name "ZATEC ext USB"
Comment 3 Bug Janitor Service 2024-10-24 15:24:05 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-pa/-/merge_requests/292
Comment 4 Harald Sitter 2024-10-25 01:25:45 UTC
Git commit aada9b287fda7b31a94883a3c1deebea76d5f5b8 by Harald Sitter.
Committed on 24/10/2024 at 15:22.
Pushed by sitter into branch 'master'.

rename: set correct device name upon reset

unclear how this broke... so as the user hits the field apply button the
model resets which prompts a recreation of the delegates. when delegates
create they call rest() to show the correct label. this then got
confused because we have an override but the value in the daemon isn't
yet the overriden one. instead use the value from our model.

from testing this seems to be working reliably in all scenarios

M  +1    -1    src/kcm/ui/RenameDevices.qml

https://invent.kde.org/plasma/plasma-pa/-/commit/aada9b287fda7b31a94883a3c1deebea76d5f5b8
Comment 5 Harald Sitter 2024-10-25 09:50:50 UTC
Git commit e8ff50c050958057b796fe6c1758d31574fa9199 by Harald Sitter.
Committed on 25/10/2024 at 01:25.
Pushed by sitter into branch 'Plasma/6.2'.

rename: set correct device name upon reset

unclear how this broke... so as the user hits the field apply button the
model resets which prompts a recreation of the delegates. when delegates
create they call rest() to show the correct label. this then got
confused because we have an override but the value in the daemon isn't
yet the overriden one. instead use the value from our model.

from testing this seems to be working reliably in all scenarios


(cherry picked from commit aada9b287fda7b31a94883a3c1deebea76d5f5b8)

Co-authored-by: Harald Sitter <sitter@kde.org>

M  +1    -1    src/kcm/ui/RenameDevices.qml

https://invent.kde.org/plasma/plasma-pa/-/commit/e8ff50c050958057b796fe6c1758d31574fa9199