B2024-038: tree view menuing for paste/replace of sections

This commit is contained in:
2024-08-08 09:01:31 -04:00
parent cf69aa93e6
commit 7cf28366f4
2 changed files with 23 additions and 8 deletions

View File

@@ -672,8 +672,10 @@ namespace Volian.Controls.Library
if (_MyDisplayTabItems.ContainsKey(key) && pasteType != ItemInfo.EAddpingPart.Replace) // If procedure page open use it unless replace
{
DisplayTabItem pg = _MyDisplayTabItems[key];
// B2024-038: if section, refresh the editor even if the section is not expanded.
bool isSec = myItemInfo.IsSection;
if (pg.MyStepTabPanel.MyStepPanel._LookupEditItems.ContainsKey(myItemInfo.ItemID) &&
pg.MyStepTabPanel.MyStepPanel._LookupEditItems[myItemInfo.ItemID].Expanded)
(pg.MyStepTabPanel.MyStepPanel._LookupEditItems[myItemInfo.ItemID].Expanded || isSec))
{
EditItem edtitm = pg.MyStepTabPanel.MyStepPanel._LookupEditItems[myItemInfo.ItemID];
switch (pasteType)
@@ -710,7 +712,8 @@ namespace Volian.Controls.Library
}
else if (_MyDisplayTabItems.ContainsKey(key) && pasteType == ItemInfo.EAddpingPart.Replace)
{
CloseTabItem(_MyDisplayTabItems["Item - " + myItemInfo.ItemID.ToString()]); //Grab itemID and set to close open tab.
// B2024-038: changed tab key to procedure (was item, which caused crash if section)
CloseTabItem(_MyDisplayTabItems["Item - " + proc.ItemID.ToString()]); //Grab itemID and set to close open tab.
return false; //B2017-179 PasteReplace will return null if was aborted
}
return false;