B2017-156 - Don't allow alignement or borders if a table cell selection is not valid
B2017-158 - Allow unlinked steps to be pasted before or after enhanced steps (Linked Steps)
This commit is contained in:
parent
a91514b0d9
commit
c684234065
@ -709,6 +709,9 @@ namespace Volian.Controls.Library
|
||||
|
||||
void MyFlexGrid_SelChange(object sender, EventArgs e)
|
||||
{
|
||||
//B2017-156 Don't allow alignment or borders if the selection is not valid
|
||||
// Alternatively allow alignment or borders if the selection is valid
|
||||
rbTblBorder.Enabled = btnTblDgnAlignText.Enabled = MyFlexGrid.Selection.IsValid;
|
||||
if (MyFlexGrid == null)
|
||||
return;
|
||||
if (MyFlexGrid.Selection.c1 < 0 || MyFlexGrid.Selection.r1 < 0)
|
||||
@ -1580,7 +1583,17 @@ namespace Volian.Controls.Library
|
||||
if (!setting && MyItemInfo.IsStep && (eds == null || eds.Count == 0)) // this step is in enhanced, but not linked
|
||||
allowDel = true; // allow delete if not linked
|
||||
btnCpyStp.Enabled = setting;
|
||||
btnStepPaste.Enabled = setting;
|
||||
//B20170-158 Allow a Unlinked Step to be pasted before or after a linked step.
|
||||
StepTabPanel tmp = Parent as StepTabPanel;
|
||||
if (tmp.MyDisplayTabControl.MyCopyStep != null)
|
||||
{
|
||||
if (!tmp.MyDisplayTabControl.MyCopyStep.IsEnhancedStep)
|
||||
{
|
||||
if (MyItemInfo.IsEnhancedStep) btnPasteReplace.Enabled = btnCMPasteReplace.Enabled = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
btnStepPaste.Enabled = setting;
|
||||
rbnCharacters.Enabled = rbnParagraph.Enabled = rbnLinks.Enabled = setting;
|
||||
btnCMEdit.Enabled = setting;
|
||||
btnDelStep.Enabled = setting; // context menu item
|
||||
@ -1609,7 +1622,8 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
btnPasteBefore.Enabled = btnCMPasteBefore.Enabled = enable;
|
||||
btnPasteAfter.Enabled = btnCMPasteAfter.Enabled = enable;
|
||||
btnPasteReplace.Enabled = btnCMPasteReplace.Enabled = enable;
|
||||
//B20170-158 Don't allow a step to replace a linked step
|
||||
btnPasteReplace.Enabled = btnCMPasteReplace.Enabled = enable && !MyItemInfo.IsEnhancedStep;
|
||||
}
|
||||
private void SetPasteButtonEnabled()
|
||||
{
|
||||
@ -3826,7 +3840,8 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
bool enableContent = enable;
|
||||
if (MyFlexGrid != null && MyFlexGrid.IsRoTable) enableContent = false;
|
||||
btnTblDgnAlignText.Enabled = enable;
|
||||
//B2017-156 Don't allow alignment or borders if the selection is not valid
|
||||
rbTblBorder.Enabled = btnTblDgnAlignText.Enabled = MyFlexGrid.Selection.IsValid && enable;
|
||||
btnTblDgnCopy.Enabled = enableContent;
|
||||
btnTblDgnRemove.Enabled = enableContent;
|
||||
btnCmGridInsert.Enabled = enableContent;
|
||||
|
Loading…
x
Reference in New Issue
Block a user