This replaces the tricky "create Inset" workflow (copy Rectangle and paste as Crop region or vice versa) with a single button click, and the Inset panel and Rectangle should stay in sync when either are updated.
To test:
Select one or more panels and in the right-tab, under ROIs, click the "Create Inset" button
This will create a new Inset Panel and a corresponding Rectangle:
When you Pan, Zoom, rotate or Resize the Inset Panel, the Rectangle will update in sync (NB: we previously handled rotation when copying crop region and pasting as ROI by creating a Polygon instead of rotated Rectangle)
When you edit the Rectangle (via the ROI dialog) the Inset Panel will update accordingly
If you copy and paste the Inset panel to create e.g. split-view panels, each of these panels is "linked" to the original Rectangle (updating any one of them will update the Rectangle and vice-versa)
If you copy and paste the parent panel that contains the Rectangle, both Rectangles in these panels are linked to the Inset Panel(s)
Save the Figure, then re-open (can simply refresh the page) and check that the Rectangle and Inset panels are still kept in sync.
Fixes #319
This replaces the tricky "create Inset" workflow (copy Rectangle and paste as Crop region or vice versa) with a single button click, and the Inset panel and Rectangle should stay in sync when either are updated.
To test:
ROIs
, click the "Create Inset" button