C2019-008 Added check for type of image (RO or imbedded) when the Insert Before/After is done while on a Figure substep type. If inserting a RO Image, the RO tab on the Step Properties panel is opened

This commit is contained in:
John Jenko 2019-02-20 17:23:43 +00:00
parent 0369a7f269
commit 3419b1b7b0

View File

@ -1324,9 +1324,19 @@ namespace Volian.Controls.Library
// if allowed by the format. Note that Before/After for figures is only Clipboard (if
// image data exists in clipboard), or file. Doing RO images will be added later if needed -
// this decision was made because of scope.
// C2019-008 - Check if sibling is a RO image. If so open the step properties panel and select the RO tab so that a RO Image (figure) can be selected. jsj 2019Feb20
private void AddImageIfNeeded(ItemInfo newItemInfo)
{
if (this is ImageItem) ImageItem.AddImageIfNeeded(newItemInfo);
if (this is ImageItem)
{
if (MyItemInfo.MyContent.MyImage != null) // C2019-008 this is null if it is a RO Image
ImageItem.AddImageIfNeeded(newItemInfo); // this will use image in windows clipboard or display a file select dialog for an image
else
{
if (MyStepPanel != null && MyStepPanel.MyStepTabPanel != null)
MyStepPanel.MyStepTabPanel.MyDisplayTabControl.OnLinkModifyRO(this, new StepPanelLinkEventArgs(null)); // C2019-008 This will open the RO tab on the Step Properties panel
}
}
}
public void AddSiblingAfter(int? type, bool updateStatus)