disable the Insert Before/After buttons when not on a step part
This commit is contained in:
parent
87d8721914
commit
047047222b
@ -431,8 +431,9 @@ namespace Volian.Controls.Library
|
|||||||
|
|
||||||
// turn ribbon items on/off base on whether there is text in the edit window
|
// turn ribbon items on/off base on whether there is text in the edit window
|
||||||
rbnSiblings.Enabled = rbnBreaks.Enabled = rbnStepParts.Enabled = allow;
|
rbnSiblings.Enabled = rbnBreaks.Enabled = rbnStepParts.Enabled = allow;
|
||||||
btnInsAftH.Enabled = btnInsBefH.Enabled = btnInsAfter.Enabled = btnInsBefore.Enabled = allow;
|
// only turn on the Insert Before/After and the CopyStep buttons if on a step part
|
||||||
btnCpyStp.Enabled = rbPdf.Enabled = allow;
|
btnInsAftH.Enabled = btnInsBefH.Enabled = btnInsAfter.Enabled = btnInsBefore.Enabled = btnCpyStp.Enabled = allow && !(MyItemInfo.IsProcedure || MyItemInfo.IsSection);
|
||||||
|
rbPdf.Enabled = allow;
|
||||||
|
|
||||||
// toggle context menus used with the shortcut key
|
// toggle context menus used with the shortcut key
|
||||||
btnCMInsHLS.Enabled = btnCMInsRNO.Enabled = btnCMInsSubStps.Enabled = btnCMInsCaution.Enabled =
|
btnCMInsHLS.Enabled = btnCMInsRNO.Enabled = btnCMInsSubStps.Enabled = btnCMInsCaution.Enabled =
|
||||||
@ -933,8 +934,6 @@ namespace Volian.Controls.Library
|
|||||||
// if on procedure or section, 'change type' & 'insert' buttons should be disabled.
|
// if on procedure or section, 'change type' & 'insert' buttons should be disabled.
|
||||||
if (MyItemInfo.IsProcedure || MyItemInfo.IsSection)
|
if (MyItemInfo.IsProcedure || MyItemInfo.IsSection)
|
||||||
{
|
{
|
||||||
btnChgTyp.Enabled = false;
|
|
||||||
|
|
||||||
btnInsCaut.Enabled = btnInsNote.Enabled = btnInsRNO.Enabled = btnInsFig.Enabled =
|
btnInsCaut.Enabled = btnInsNote.Enabled = btnInsRNO.Enabled = btnInsFig.Enabled =
|
||||||
btnInsTable.Enabled = btnInsSubstep.Enabled = btnInsBefore.Enabled = btnInsAfter.Enabled = false;
|
btnInsTable.Enabled = btnInsSubstep.Enabled = btnInsBefore.Enabled = btnInsAfter.Enabled = false;
|
||||||
// if on a section, allow note/caution. May want to add condition that this is a subsection?
|
// if on a section, allow note/caution. May want to add condition that this is a subsection?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user