Fixed Insert Table shortcut key functionality

This commit is contained in:
John Jenko 2015-07-01 15:03:36 +00:00
parent 9e6d543133
commit a17ea54db0

View File

@ -1320,16 +1320,25 @@ namespace Volian.Controls.Library
{ {
// If there is only one 'table' type from format under the ribbon's table item, // If there is only one 'table' type from format under the ribbon's table item,
// eliminate that button and move up the RO & Text Table buttons. // eliminate that button and move up the RO & Text Table buttons.
if (btn.SubItems.Count == 1) if (btn.SubItems.Count == 1) // single column step editor
{ {
// setup the sub menus for the insert table ribbon button
btn.Tag = btn.SubItems[0].Tag; btn.Tag = btn.SubItems[0].Tag;
btn.SubItems.Clear(); btn.SubItems.Clear();
DoTableSubMenu(btn); DoTableSubMenu(btn);
// setup the sub menus for the context menu used with the keyborad shortcut <shift><ctrl><T>
cmbtn.Tag = cmbtn.SubItems[0].Tag;
cmbtn.SubItems.Clear();
DoTableSubMenu(cmbtn);
} }
else else
{ {
// setup the sub menus for the insert table ribbon button
foreach (DevComponents.DotNetBar.ButtonItem tabbtn in btn.SubItems) foreach (DevComponents.DotNetBar.ButtonItem tabbtn in btn.SubItems)
DoTableSubMenu(tabbtn); DoTableSubMenu(tabbtn);
// setup the sub menus for the context menu used with the keyborad shortcut <shift><ctrl><T>
foreach (DevComponents.DotNetBar.ButtonItem cmtabbtn in cmbtn.SubItems)
DoTableSubMenu(cmtabbtn);
} }
} }
// if only 1, be sure event exists on button to insert item & if more than 1 remove event because // if only 1, be sure event exists on button to insert item & if more than 1 remove event because