Summary: | After cancelling or finishing inline renaming, I can't use arrow keys for moving focus. | ||
---|---|---|---|
Product: | [Applications] dolphin | Reporter: | Jekyll Wu <adaptee> |
Component: | general | Assignee: | Peter Penz <peter.penz19> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | arthur, avbalves, frank78ac, kde |
Priority: | NOR | ||
Version: | 2.0.95 | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 4.9.0 | |
Sentry Crash Report: |
Description
Jekyll Wu
2012-06-06 00:46:17 UTC
I confirm this with Archlinux KDE 4.9 beta1 Thanks for the report, this has just been fixed by commit 2e057eb6e21fe850c101a1f2bedaffd986ffdf3a (forgot to add the bug-number in the commit-message). Funny, I was just working on the same thing :-) And I think that I found a problem that your fix does not address, Peter: If the renaming is cancelled, e..g, by clicking another view in split view mode or the Places Panel, the new focus widget should keep the focus, but at the moment, the DolphinView just steals it. My approach was to add the following code in KStandardItemListWidget::slotRoleEditing* (looks less elegant than your solution though): if (m_roleEditor->hasFocus()) { // If the editing was not ended by a FocusOut event, we have // to transfer the keyboard focus back to the KItemListContainer. qobject_cast<QWidget*>(scene()->views()[0]->parent())->setFocus(); } Maybe we can find a way to replace the ugly line by something that invokes DolphinView's setFocus() slot. Thanks Frank for noticing this issue, you are of course right. Although you say your solution looks less elegant than mine, I think your solution is the better one :-) This kind of focus-handling should be done internally by the KItemList* classes and not externally by the DolphinView like with my approach. The line qobject_cast<QWidget*>(scene()->views()[0]->parent())->setFocus(); looks of course really ugly. I did a very minor cosmetic improvement with: scene()->views()[0]->parentWidget()->setFocus(); but it is still not a beauty ;-) However when I worked on the libmeegotouch-classes I've seen that there it has been done in a similar way and QGraphicsView* does not offer a nicer API for this. So I've just created a patch with your solution now and will push it. Git commit 2cfa7298c2501f96cfcf45f0e562696ec818039f by Peter Penz. Committed on 08/06/2012 at 22:43. Pushed by ppenz into branch 'master'. Inline renaming: Improve focus handling Fix issue that cancelling the inline-renaming by clicking on the other split view applies the wrong focus. Thanks to Frank Reininghaus for the initial patch and noticing this issue. M +13 -4 dolphin/src/kitemviews/kstandarditemlistwidget.cpp M +6 -0 dolphin/src/kitemviews/kstandarditemlistwidget.h M +0 -11 dolphin/src/views/dolphinview.cpp M +0 -1 dolphin/src/views/dolphinview.h http://commits.kde.org/kde-baseapps/2cfa7298c2501f96cfcf45f0e562696ec818039f *** Bug 302157 has been marked as a duplicate of this bug. *** *** Bug 302321 has been marked as a duplicate of this bug. *** |