Prevent focusing tab-bar when Krusader window is activated after previous item rename
ClosedPublic

Authored by martinkostolny on May 8 2017, 1:28 PM.

Details

Summary

Steps to reproduce the issue:

  1. Start renaming an item (file or folder)
  2. Switch to another application and back to Krusader
  3. Now, widgets in tab area got focused, so pressing e.g. down/up arrow buttons won't change focused file or folder

This patch should fix that.

Interestingly, I can replicate the same thing in Dolphin as well. It kind of look as a Qt bug to me... If we agree on that, I'll file a Qt bug report.

Test Plan

Replicate the steps above for both detailed as well as brief view.

Diff Detail

Repository
R167 Krusader
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
martinkostolny created this revision.May 8 2017, 1:28 PM
abika accepted this revision.May 12 2017, 5:20 PM
abika added a subscriber: abika.

Thanks! Can confirm in Krusader and a toy application (https://github.com/abika/cpp-qt-kf5-file-browser). Yes, it is probably a bug in Qt.

Alternative fix:

krusader/Panel/krviewitemdelegate.cpp#138

             _currentlyEdited = -1;
+            // manually set focus back to panel after rename canceled by focusing another window
+            ACTIVE_PANEL->gui->slotFocusOnMe();
             emit closeEditor(editor, RevertModelCache);
         }

Not sure whats better. If its only happening in one case, its could be better to fix it at the source.

This revision is now accepted and ready to land.May 12 2017, 5:20 PM

Thanks for checking on this. I'm using your suggestion because I agree, it should be fixed closest to the source of troubles.

This revision was automatically updated to reflect the committed changes.