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:
1 parent
8e39a307f2
commit
07fc46d11d
2 files changed
+55
-26
No files matched your search
@@ -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