Added EditItem_Enter event to better handle the enable/disable of ribbon button used to insert step types and for copy/paste step
Don’t allow a table to be copied into a non-table step type. Allow copy step from a sub-step to a high level step.
This commit is contained in:
@@ -49,12 +49,24 @@ namespace Volian.Controls.Library
|
||||
public EditItem()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.Enter += EditItem_Enter;
|
||||
}
|
||||
|
||||
// This event was added to better control enabling or disabling of the Insert and Copy Step buttons on the ribbon
|
||||
void EditItem_Enter(object sender, EventArgs e)
|
||||
{
|
||||
Console.WriteLine("EditItem Enter {0}", MyItemInfo);
|
||||
bool allow = (MyStepPanel.VwMode == E_ViewMode.Edit);
|
||||
StepTabRibbon str = MyStepPanel.MyStepTabPanel.MyStepTabRibbon;
|
||||
str.SiblingsButtonsEnabled = allow;
|
||||
str.InsertButtonsEnabled = allow && !(MyItemInfo.IsProcedure || MyItemInfo.IsSection);
|
||||
}
|
||||
|
||||
public EditItem(IContainer container)
|
||||
{
|
||||
container.Add(this);
|
||||
InitializeComponent();
|
||||
this.Enter += EditItem_Enter;
|
||||
}
|
||||
#endregion
|
||||
#region Properties
|
||||
|
Reference in New Issue
Block a user