Page MenuHomePhabricator

Placeholders used for multiple views instance are not recreated after closing the views
Closed, WontfixPublic

Description

Here are the steps to produce the issue :

  1. Create a new view in a plugin with the attribute "allowMultiple" set to true in the plugin.xml (to be able to have multiple instance of the same view)
  2. Create placeholders for the views using the special naming convention for multiple views : "VIEW_ID:VIEW_SECONDARY_ID"
  3. Call the methode "ShowView" on the active page with the same id's

-> Views are correctly placed in the workbench according to the placeholders created

  1. Now, if I decide to close one view and to reopen it later, the view is placed automatically in the workbench and not following the placeholder created previously.

At first I was wondering if it is a normal behaviour in blueberry or not. Having a look at the file berryPerspectiveHelper.cpp (plugin blueberry.ui.qt) one can see that when removing a part (Func. RemovePart L.1291) the workbench is supposed to recreate a placeholder for later opening of this part. However, the multiple view case does not seem to be taken into account (no reference to the secondary ID of the part).


I made a little fix which solve the issue (see attached patch), just by taking the secondary ID of the part if it exists.

After quick tests, it seems to work quite well (multiple views are placed according to their placeholders even after closing them)

Edit : added partial link to the diff :
https://phabricator.mitk.org/differential/diff/15/

Event Timeline

kislinsk claimed this task.
kislinsk added a project: Auto-closed.
kislinsk added a subscriber: kislinsk.

Hi there! 🙂

This task was auto-closed according to our Task Lifecycle Management.
Please follow this link for more information and don't forget that you are encouraged to reasonable re-open tasks to revive them. 🚑

Best wishes,
The MITK devs

kislinsk removed kislinsk as the assignee of this task.May 26 2020, 12:05 PM
kislinsk removed a subscriber: kislinsk.