Fixed the regression of selection not being stored from table to tree

This fixes the regression that I caused in the last commit,
where the selection was being correctly reestored from tree-to-table,
but it was incorrectly being restored from table-to-tree.

I also added a bit of speedup on the view while changing columns.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Code Cleanup.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>