C2017-002 Allow inheritance of step data elements

This commit is contained in:
2017-01-10 13:01:58 +00:00
parent 9a699e7e40
commit 4c4396e8c8
4 changed files with 160 additions and 29 deletions

View File

@@ -1250,7 +1250,7 @@ namespace Volian.Controls.Library
public void SetButtonAndMenuEnabling(bool docontextmenus)
{
if (_MyStepRTB == null) return;
if (_MyStepRTB.FieldToEdit != E_FieldToEdit.StepText && !MyItemInfo.IsFigure & !MyItemInfo.IsRtfRaw) // want menu enabling for figures & aations
if (_MyStepRTB.FieldToEdit != E_FieldToEdit.StepText && !MyItemInfo.IsFigure && !MyItemInfo.IsRtfRaw) // want menu enabling for figures & aations
return; // No need to change menu that does not get used
DocVersionInfo dvi = MyEditItem.MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo;
if (dvi == null) return;
@@ -1682,7 +1682,7 @@ namespace Volian.Controls.Library
btnInsSubstep.Enabled = (actable & E_AccStep.AddingSub) > 0;
btnInsBefore.Enabled = btnInsBefH.Enabled = !MyItemInfo.IsRNOPart && (actable & E_AccStep.AddingPrev) > 0;
btnInsAfter.Enabled = btnInsAftH.Enabled = !MyItemInfo.IsRNOPart && (actable & E_AccStep.AddingNext) > 0;
btnInsEquation.Enabled = (actable & E_AccStep.AddingTable) > 0 && MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList.Equation != null;
btnInsEquation.Enabled = (actable & E_AccStep.AddingTable) > 0;
// if this step has a table, figure or equation, disable both of those buttons.
if (MyItemInfo.Tables != null && MyItemInfo.Tables.Count > 0)