From 5e35194b00d84db6aea3370ee8bb0ad560428c62 Mon Sep 17 00:00:00 2001 From: Pan Zhang Date: Mon, 23 Mar 2026 10:12:10 +0800 Subject: kitemviews: Preserve inline rename when item scrolls out of view Inline rename was canceled when the edited item scrolled out of view. Scrolling could both finish the edit and recycle the item widget, causing the typed name to be lost. Keep the inline rename editor alive while the item is temporarily offscreen. Update the editor geometry on scroll, avoid recycling the widget while it is being edited, and suppress the temporary FocusOut triggered by hiding the editor. If the user interacts with another item while the edited one is offscreen, finish the hidden edit first so normal selection behavior is preserved. BUG: 506884 --- src/kitemviews/kstandarditemlistwidget.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/kitemviews/kstandarditemlistwidget.h') diff --git a/src/kitemviews/kstandarditemlistwidget.h b/src/kitemviews/kstandarditemlistwidget.h index 992d41aa1..e0a32b745 100644 --- a/src/kitemviews/kstandarditemlistwidget.h +++ b/src/kitemviews/kstandarditemlistwidget.h @@ -197,6 +197,7 @@ protected: public Q_SLOTS: void finishRoleEditing(); void cancelRoleEditing(); + void updateRoleEditorGeometry(); private Q_SLOTS: void slotCutItemsChanged(); -- cgit v1.3