Don’t expand the RO step properties panel if the working draft does not have a RO Path set

Disable the GoTo button if on an empty RO table type.  Disable the Insert RO button if the working draft does not have a RO Path set
This commit is contained in:
John Jenko 2016-05-24 19:06:30 +00:00
parent 2498cd10dc
commit d28304fd4c
2 changed files with 9 additions and 5 deletions

View File

@ -3255,10 +3255,12 @@ namespace VEPROMS
}
private void tc_LinkModifyRO(object sender, StepPanelLinkEventArgs args)
{
if (_SelectedROFst == null && (SelectedDVI == null || SelectedDVI.DocVersionAssociationCount == 0)) return; // B2016-128, not RO path associated to the working draft
if (SelectedStepTabPanel == null) return;
infoPanel.Expanded = true;
infoTabs.SelectedTab = infotabRO;
if (SelectedStepTabPanel == null) return;
displayRO.MyROFSTLookup = SelectedROFst.GetROFSTLookup(SelectedDVI);
displayRO.MyRTB = SelectedStepTabPanel.MyStepPanel.SelectedEditItem.MyStepRTB;
displayRO.CurROLink = args.MyLinkText.MyRoUsageInfo;

View File

@ -900,7 +900,8 @@ namespace Volian.Controls.Library
private void SetupGoToButton()
{
if (MyEditItem is GridItem && (MyEditItem as GridItem).MyFlexGrid.IsRoTable)
btnCMGoTo.Enabled = btnGoTo.Enabled = UserInfo.CanEditROs(MyUserInfo, Mydvi);//Don't allow Writers and Reviews run the RO Editor
// B2016-127 - disable if is an RO table type but no RO was selected.
btnCMGoTo.Enabled = btnGoTo.Enabled = UserInfo.CanEditROs(MyUserInfo, Mydvi) && (MyEditItem as GridItem).MyFlexGrid.ROID != null;//Don't allow Writers and Reviews run the RO Editor
else
{
if (_MyStepRTB == null) return;
@ -1112,7 +1113,8 @@ namespace Volian.Controls.Library
btnCMChgStep.Enabled = btnChgTyp.Enabled = setting;
btnInsHLS.Enabled = btnInsCaut.Enabled = btnInsNote.Enabled = btnInsRNO.Enabled = btnInsFig.Enabled =
btnInsTable.Enabled = btnInsSubstep.Enabled = btnInsBefore.Enabled = btnInsAfter.Enabled = setting;
btnInsTrans.Enabled = btnCMTransition.Enabled = btnInsRO.Enabled = btnCMRO.Enabled = setting;
btnInsTrans.Enabled = btnCMTransition.Enabled = setting;
btnInsRO.Enabled = btnCMRO.Enabled = setting && Mydvi.DocVersionAssociationCount > 0; // 2016-128 don't enable if RO Path was not selected at the Working Draft node
btnInsAftH.Enabled = btnInsBefH.Enabled = setting;
btnCMChgCase.Enabled = btnChgCase.Enabled = setting;
btnCMHardSpace.Enabled = btnInsHrdSpc.Enabled = setting;
@ -1559,7 +1561,7 @@ namespace Volian.Controls.Library
if (btnInsRNO.Enabled) GalleryForSubTypes(MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList.RNO, sd, btnInsRNO, 0, btnCMInsRNO, docontextmenus);
btnInsTrans.Enabled = btnCMTransition.Enabled = !MyItemInfo.IsFigure;
btnInsRO.Enabled = btnCMRO.Enabled = true;
btnInsRO.Enabled = btnCMRO.Enabled = Mydvi.DocVersionAssociationCount > 0; // 2016-128 don't enable if RO Path was not selected at the Working Draft node
// if in Calvert Alarms Condition/Response, disable insert of Cautions and Notes
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm)
@ -3243,7 +3245,7 @@ namespace Volian.Controls.Library
btnSymbols.Enabled = enable && !MyFlexGrid.IsRoTable;// enable;
btnIndent.Enabled = enable && !MyFlexGrid.IsRoTable;// ;enable;
btnInsTrans.Enabled = enable && !MyFlexGrid.IsRoTable;// ;
btnInsRO.Enabled = enable;
btnInsRO.Enabled = enable && Mydvi.DocVersionAssociationCount > 0; // 2016-128 don't enable if RO Path was not selected at the Working Draft node
btnCMRtfCellEdit.Enabled = enable && !MyFlexGrid.IsRoTable;
}
private void btnTblDgnAdjustSize_Click(object sender, EventArgs e)