B2022-049: Copy/paste of enhanced procedure and bad links between source and enhanced
This commit is contained in:
@@ -183,7 +183,9 @@ namespace Volian.Controls.Library
|
||||
if (bi.Name.StartsWith("btnEnhanced"))
|
||||
existingEnhancedButtons.Add(bi.Name);
|
||||
bool inSource = dveds[0].Type != 0;
|
||||
int buttonsNeeded = inSource ? dveds.Count : (dveds.Count * 2); // enhanced items need unlink button also.
|
||||
int buttonsNeeded = inSource ? dveds.Count : (dveds.Count * 2); // enhanced items need unlink button also.
|
||||
// if in view only mode, don't do unlink
|
||||
if (!inSource && MyEditItem != null && MyEditItem.MyStepPanel.VwMode == E_ViewMode.View) buttonsNeeded--;
|
||||
if (MyItemInfo.IsSection && !MyItemInfo.IsStepSection) buttonsNeeded = 0; // no buttons for word sections
|
||||
if (buttonsNeeded > existingEnhancedButtons.Count) // add buttons
|
||||
{
|
||||
@@ -195,7 +197,8 @@ namespace Volian.Controls.Library
|
||||
biEnhanced.Click += btnEnhancedGoTo_Click;
|
||||
myButtonItem.SubItems.Add(biEnhanced);
|
||||
existingEnhancedButtons.Add(biEnhanced.Name);
|
||||
if (!inSource)
|
||||
// if in view only mode, don't do unlink
|
||||
if (!inSource && MyEditItem != null && MyEditItem.MyStepPanel.VwMode != E_ViewMode.View)
|
||||
{
|
||||
// add unlink buttons:
|
||||
buttonName = string.Format("btnEnhancedUnlink{0}", dved.Type);
|
||||
|
Reference in New Issue
Block a user