-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 7.3
-
Component/s: Image Management
-
Tags:
-
Sprint:TGV 7.2-3
-
Story Points:2
After using the MultiviewPictureAdapter to add a view, the UI is broken (see screenshot).
I think it is because this code does not handle the ImageInfo of the view, while the widget displaying the views relies on these.
Note: As I needed to make it work "now", I duplicated the viewToMap in my own plug-in, adding map.put(PictureView.FIELD_INFO, view.getImageInfo().toMap());, and all was good.
Original code:
// ...fill values (title, ...) MultiviewPicture mvp = inDoc.getAdapter(MultiviewPicture.class); PictureView view = mvp.getView(title); if(view != null) { mvp.removeView(title); } ImagingService imagingService = Framework.getService(ImagingService.class); ImageInfo info = imagingService.getImageInfo(croppedBlob); view = new PictureViewImpl(); view.setBlob(croppedBlob); view.setDescription(title); view.setFilename(croppedBlob.getFilename()); view.setHeight((int) height); view.setImageInfo(info); view.setTitle(title); view.setWidth((int) width); mvp.addView(view); // ... save doc, continue code ...