Skip to content

MainWindow: Make activateView activate a view in another space if needed

Waqar Ahmed requested to merge work/view-activation into master

So far activateView looked in the current viewspace for a document's view, if it didn't exist it just created a new one. Our previous implemention of views always had the same views open everywhere so it didn't matter.

However, since a year or so each viewspace can have different set of views. This change will change the behaviour in the following way:

  • If no views exist for a doc => create new
  • If there is only one viewspace => switch to the view / create new
  • If the doc has a view in the current space => switch to the view
  • If the doc does not have a view in the current space => finding the viewspace that has it and activate that view

This doesnot change openUrl() behaviour. It only affects direct calls to activateView which are made from Documents plugin and TabSwitcher plugin.

BUG: 465814

Edited by Waqar Ahmed

Merge request reports