diff --git a/PROMS/Volian.Controls.Library/StepTabRibbon.cs b/PROMS/Volian.Controls.Library/StepTabRibbon.cs index caebf942..4c119556 100644 --- a/PROMS/Volian.Controls.Library/StepTabRibbon.cs +++ b/PROMS/Volian.Controls.Library/StepTabRibbon.cs @@ -415,8 +415,13 @@ namespace Volian.Controls.Library } public void OpenContextMenu(Point loc, object sender) { - AddEnhancedDocumentMenu(btnCMRtfEdit,sender); - btnCMRtfEdit.Popup(loc); + if (rtabTableGridTools != null && !rtabTableGridTools.Visible) + { + AddEnhancedDocumentMenu(btnCMRtfEdit, sender); + btnCMRtfEdit.Popup(loc); + } + else // in a table cell, use the table cell's context menu: + btnCMRtfCellEdit.Popup(loc); } private int _MyLastFormatID = -1; private StepRTB _MyStepRTB; @@ -438,7 +443,7 @@ namespace Volian.Controls.Library case E_FieldToEdit.StepText: if (MyFlexGrid != null) { - // This happends when the FlexGrid (table) is slected (not when you edit a table cell) + // This happends when the FlexGrid (table) is selected (not when you edit a table cell) _ContextMenuBar.SetContextMenuEx(_MyStepRTB, btnCMRtfCellEdit); _DefaultContextMenu = btnCMRtfCellEdit; }