B2017-208 The Bold, Italics, Underline buttons were staying checked when applying to a multiple cell selection, even when you selected a different table cell. . This would be true if you move off the table then back on it, but would not be true if you exited PROMS then got back in.
B2017-200 Newly entered text in a table cell will now be saved when the Copy Row, Column, or Selection is performed. Prior to this, if a table cell was actively being edited (still had the dark blue background), the new text would not be save before the copy/paste of a table row, column, or selection was performed.
This commit is contained in:
parent
4a7ae53502
commit
d27eb9a2b2
@ -1460,11 +1460,14 @@ namespace Volian.Controls.Library
|
||||
|
||||
if (_MyStepRTB.SelectionFont != null)
|
||||
{
|
||||
btnCMBold.Checked = btnBold.Checked = RTBAPI.IsBold(_MyStepRTB);
|
||||
btnCMItalics.Checked = btnItalics.Checked = RTBAPI.IsItalic(_MyStepRTB);
|
||||
btnCMUnderline.Checked = btnUnderline.Checked = RTBAPI.IsUnderline(_MyStepRTB);
|
||||
btnCMSubscript.Checked = btnSubscript.Checked = RTBAPI.IsSubScript(_MyStepRTB);
|
||||
btnCMSuperscript.Checked = btnSuperscript.Checked = RTBAPI.IsSuperScript(_MyStepRTB);
|
||||
// B2017-208 added (MyFlexGrid == null || MyFlexGrid.TableCellEditor.EditMode)
|
||||
// toggle on/off attributes button checks when you edit table cells, going from one cell to another
|
||||
// Also don't keep the attributes buttons checked after setting a group of table cells all at one time
|
||||
btnCMBold.Checked = btnBold.Checked = RTBAPI.IsBold(_MyStepRTB) && (MyFlexGrid == null || MyFlexGrid.TableCellEditor.EditMode);
|
||||
btnCMItalics.Checked = btnItalics.Checked = RTBAPI.IsItalic(_MyStepRTB) && (MyFlexGrid == null || MyFlexGrid.TableCellEditor.EditMode);
|
||||
btnCMUnderline.Checked = btnUnderline.Checked = RTBAPI.IsUnderline(_MyStepRTB) && (MyFlexGrid == null || MyFlexGrid.TableCellEditor.EditMode);
|
||||
btnCMSubscript.Checked = btnSubscript.Checked = RTBAPI.IsSubScript(_MyStepRTB) && (MyFlexGrid == null || MyFlexGrid.TableCellEditor.EditMode);
|
||||
btnCMSuperscript.Checked = btnSuperscript.Checked = RTBAPI.IsSuperScript(_MyStepRTB) && (MyFlexGrid == null || MyFlexGrid.TableCellEditor.EditMode);
|
||||
}
|
||||
SetButtonForStyle();
|
||||
|
||||
@ -2614,12 +2617,16 @@ namespace Volian.Controls.Library
|
||||
private void btnBold_Click(object sender, EventArgs e)
|
||||
{
|
||||
ApplyStyleToCurrentStepOrGridSelection(SelectionOption.All,ToggleBold);
|
||||
btnCMBold.Checked = btnBold.Checked = RTBAPI.IsBold(_MyStepRTB);
|
||||
// B2017-208 toggle on/off attributes button checks when you edit table cells, going from one cell to another
|
||||
// Also don't keep the attributes buttons checked after setting a group of table cells all at one time
|
||||
btnCMBold.Checked = btnBold.Checked = RTBAPI.IsBold(_MyStepRTB) && (MyFlexGrid == null || MyFlexGrid.TableCellEditor.EditMode);
|
||||
}
|
||||
private void btnItalics_Click(object sender, EventArgs e)
|
||||
{
|
||||
ApplyStyleToCurrentStepOrGridSelection(SelectionOption.All,ToggleItalic);
|
||||
btnCMItalics.Checked = btnItalics.Checked = RTBAPI.IsItalic(_MyStepRTB);
|
||||
// B2017-208 toggle on/off attributes button checks when you edit table cells, going from one cell to another
|
||||
// Also don't keep the attributes buttons checked after setting a group of table cells all at one time
|
||||
btnCMItalics.Checked = btnItalics.Checked = RTBAPI.IsItalic(_MyStepRTB) && (MyFlexGrid == null || MyFlexGrid.TableCellEditor.EditMode);
|
||||
}
|
||||
|
||||
private void ToggleItalic()
|
||||
@ -2629,7 +2636,9 @@ namespace Volian.Controls.Library
|
||||
private void btnUnderline_Click(object sender, EventArgs e)
|
||||
{
|
||||
ApplyStyleToCurrentStepOrGridSelection(SelectionOption.All, ToggleUnderline);
|
||||
btnCMUnderline.Checked = btnUnderline.Checked = RTBAPI.IsUnderline(_MyStepRTB);
|
||||
// B2017-208 toggle on/off attributes button checks when you edit table cells, going from one cell to another
|
||||
// Also don't keep the attributes buttons checked after setting a group of table cells all at one time
|
||||
btnCMUnderline.Checked = btnUnderline.Checked = RTBAPI.IsUnderline(_MyStepRTB) && (MyFlexGrid == null || MyFlexGrid.TableCellEditor.EditMode);
|
||||
}
|
||||
|
||||
private void ToggleUnderline()
|
||||
@ -3824,12 +3833,12 @@ namespace Volian.Controls.Library
|
||||
MyFlexGrid.InsertRowAfter();
|
||||
}
|
||||
|
||||
private void btnTblDgnInsertColumnAbove_Click(object sender, EventArgs e)
|
||||
private void btnTblDgnInsertColumnBefore_Click(object sender, EventArgs e)
|
||||
{
|
||||
MyFlexGrid.InsertColumnBefore();
|
||||
}
|
||||
|
||||
private void btnTblDgnInsertColumnBelow_Click(object sender, EventArgs e)
|
||||
private void btnTblDgnInsertColumnAfter_Click(object sender, EventArgs e)
|
||||
{
|
||||
MyFlexGrid.InsertColumnAfter();
|
||||
}
|
||||
@ -3880,6 +3889,14 @@ namespace Volian.Controls.Library
|
||||
// set to true if editing cell, otherwise false for grids
|
||||
//bool enable = (MyFlexGrid != null && MyFlexGrid.Editor != null);
|
||||
|
||||
// B2017-208 toggle on/off attributes button checks when you edit table cells, going from one cell to another
|
||||
// Also don't keep the attributes buttons checked after setting a group of table cells all at one time
|
||||
btnCMBold.Checked = btnBold.Checked = RTBAPI.IsBold(_MyStepRTB) && (MyFlexGrid == null || MyFlexGrid.TableCellEditor.EditMode);
|
||||
btnCMItalics.Checked = btnItalics.Checked = RTBAPI.IsItalic(_MyStepRTB) && (MyFlexGrid == null || MyFlexGrid.TableCellEditor.EditMode);
|
||||
btnCMUnderline.Checked = btnUnderline.Checked = RTBAPI.IsUnderline(_MyStepRTB) && (MyFlexGrid == null || MyFlexGrid.TableCellEditor.EditMode);
|
||||
btnCMSubscript.Checked = btnSubscript.Checked = RTBAPI.IsSubScript(_MyStepRTB) && (MyFlexGrid == null || MyFlexGrid.TableCellEditor.EditMode);
|
||||
btnCMSuperscript.Checked = btnSuperscript.Checked = RTBAPI.IsSuperScript(_MyStepRTB) && (MyFlexGrid == null || MyFlexGrid.TableCellEditor.EditMode);
|
||||
|
||||
bool enable = (MyFlexGrid != null && MyEditItem.MyStepPanel.VwMode == E_ViewMode.Edit);
|
||||
//btnPasteText.Enabled = btnPasteStepText.Enabled = btnPaste.Enabled = enable;
|
||||
btnPaste.Enabled = (iData.GetDataPresent(DataFormats.Text) || iData.GetDataPresent(DataFormats.Rtf)) && enable;
|
||||
|
BIN
PROMS/Volian.Controls.Library/StepTabRibbon.designer.cs
generated
BIN
PROMS/Volian.Controls.Library/StepTabRibbon.designer.cs
generated
Binary file not shown.
@ -3132,6 +3132,7 @@ namespace Volian.Controls.Library
|
||||
|
||||
public void CopyRow()
|
||||
{
|
||||
_tableCellEditor.Hide(); // B2017-200 force save of changes from active edit session
|
||||
DialogResult dr = DialogResult.Yes;
|
||||
SelectRow();
|
||||
if (Selection.r1 != Selection.r2)
|
||||
@ -3145,6 +3146,7 @@ namespace Volian.Controls.Library
|
||||
|
||||
public void CopyColumn()
|
||||
{
|
||||
_tableCellEditor.Hide(); // B2017-200 force save of changes from active edit session
|
||||
SelectCol();
|
||||
DialogResult dr = DialogResult.Yes;
|
||||
if (Selection.c1 != Selection.c2)
|
||||
@ -3158,6 +3160,7 @@ namespace Volian.Controls.Library
|
||||
|
||||
public void CopyCellSelection()
|
||||
{
|
||||
_tableCellEditor.Hide(); // B2017-200 force save of changes from active edit session
|
||||
DialogResult dr = DialogResult.Yes;
|
||||
CellRange cr = Selection;
|
||||
MakeSelectionEven();
|
||||
|
Loading…
x
Reference in New Issue
Block a user