Fixed B2013-175: Shortcut for inserting substeps is blank menu
This commit is contained in:
parent
ae7058eb8d
commit
dfd6dd4f3a
@ -1275,6 +1275,16 @@ namespace Volian.Controls.Library
|
|||||||
btn.Click -= new System.EventHandler(btnInsStep_Click);
|
btn.Click -= new System.EventHandler(btnInsStep_Click);
|
||||||
btn.Click += new System.EventHandler(btnInsStep_Click);
|
btn.Click += new System.EventHandler(btnInsStep_Click);
|
||||||
btn.Tag = string.Format("{0} {1}", fromtype, ichld.MyContent.Type - 20000);
|
btn.Tag = string.Format("{0} {1}", fromtype, ichld.MyContent.Type - 20000);
|
||||||
|
|
||||||
|
// B2013-175: add the single substep type to the context menu too
|
||||||
|
int cmtype = (int)ichld.MyContent.Type - 20000; // content type is the index into the stepdatalist
|
||||||
|
StepData sdcm = MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList[cmtype];
|
||||||
|
DevComponents.DotNetBar.ButtonItem cmbix = new DevComponents.DotNetBar.ButtonItem("cmbtn" + sdcm.Type, sdcm.Type);
|
||||||
|
cmbix.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.TextOnlyAlways;
|
||||||
|
cmbix.Text = sdcm.StepEditData.TypeMenu.MenuItem;
|
||||||
|
cmbix.Tag = string.Format("{0} {1}", fromtype, sdcm.Index); // index of type to insert it when button is clicked
|
||||||
|
cmbix.Click += new System.EventHandler(btnInsStep_Click);
|
||||||
|
cmbtn.SubItems.Add(cmbix);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user