Fixed lost editor when file is updating and the list model to correctly handle…

Authored by nmel on Jul 12 2019, 6:54 AM.

Description

Fixed lost editor when file is updating and the list model to correctly handle next item

Summary:
The lost editor issue (see the bug for reference) was happening
because the editor hasn't been closed in the view but the item is
deleted and re-inserted. The fix is to close any editor attached to
an item before removing the item.

The workaround for next item current selection introduced in 2fbd49f0
is no longer needed due to the fix of the underlying issue in the list model.
Without the fix, the lost editor issue is also observed
when editing the file which is next to the updating one.

FIXED: [ 392750 ] After trying to rename the file that's being updated, rename function stops working on any file on this tab
BUG: 392750

Differential Revision: https://phabricator.kde.org/D22431