disable the Insert Before/After buttons when not on a step part
This commit is contained in:
		| @@ -431,8 +431,9 @@ namespace Volian.Controls.Library | ||||
|  | ||||
| 			// turn ribbon items on/off base on whether there is text in the edit window | ||||
| 			rbnSiblings.Enabled = rbnBreaks.Enabled = rbnStepParts.Enabled = allow; | ||||
| 			btnInsAftH.Enabled = btnInsBefH.Enabled = btnInsAfter.Enabled = btnInsBefore.Enabled = allow; | ||||
| 			btnCpyStp.Enabled = rbPdf.Enabled = allow; | ||||
| 			// only turn on the Insert Before/After and the CopyStep buttons if on a step part | ||||
| 			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 | ||||
| 			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 (MyItemInfo.IsProcedure || MyItemInfo.IsSection) | ||||
| 			{ | ||||
| 				btnChgTyp.Enabled = false; | ||||
|  | ||||
| 				btnInsCaut.Enabled = btnInsNote.Enabled = btnInsRNO.Enabled = btnInsFig.Enabled = | ||||
| 					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? | ||||
|   | ||||
		Reference in New Issue
	
	Block a user