B2020-052: Context menu items for setting text styles does not work in Procedure properties (or PSI)
This commit is contained in:
parent
72be053111
commit
ca4ce8b232
@ -1510,9 +1510,10 @@ 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
|
||||
// B2020-052: context menu items for setting text styles, fix for properties:
|
||||
if ((_MyStepRTB.FieldToEdit != E_FieldToEdit.Number && _MyStepRTB.FieldToEdit != E_FieldToEdit.Text && _MyStepRTB.FieldToEdit != E_FieldToEdit.PSI) && _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;
|
||||
DocVersionInfo dvi = MyEditItem != null ? MyEditItem.MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo : MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo;
|
||||
if (dvi == null) return;
|
||||
// enable the following in case they were disabled for enhanced steps - only do for formats that have enhanced:
|
||||
if (!MyItemInfo.IsEnhancedStep && !MyItemInfo.IsEnhancedSection &&
|
||||
@ -1520,7 +1521,7 @@ namespace Volian.Controls.Library
|
||||
((MyItemInfo.ActiveFormat.PlantFormat.FormatData.PurchaseOptions.Value & E_PurchaseOptions.EnhancedDeviations) == E_PurchaseOptions.EnhancedDeviations)))
|
||||
SetButtonEnablingForEnhanced(MyUserInfo.IsAllowedToEdit(dvi)); // B2018-112 - set context menu and ribbon buttons based on user's PROMS Security setting
|
||||
|
||||
if (dvi.VersionType > 127 || MyEditItem.MyStepPanel.VwMode == E_ViewMode.View)
|
||||
if (dvi.VersionType > 127 || (MyEditItem != null && MyEditItem.MyStepPanel.VwMode == E_ViewMode.View))
|
||||
{
|
||||
SetButtonMenuEnabledDisabledOnSelection(false);
|
||||
}
|
||||
@ -1738,6 +1739,7 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
#region new code
|
||||
StepTabPanel tmp = Parent as StepTabPanel;
|
||||
if (tmp == null) return;
|
||||
//turn all on
|
||||
SetPasteButtons(true);
|
||||
//copy item is null, turn all off and return
|
||||
|
Loading…
x
Reference in New Issue
Block a user