B2018-127 Use the row and column from the merged cells range to update a selected table cell.
This commit is contained in:
parent
d2a442e385
commit
1d113b519d
@ -1285,6 +1285,7 @@ namespace Volian.Controls.Library
|
|||||||
IsSaving = true;
|
IsSaving = true;
|
||||||
if (MyFlexGrid.Row >= 0 && MyFlexGrid.Col >= 0 && MyStepRTB.EditMode) // Only if a Cell is Selected
|
if (MyFlexGrid.Row >= 0 && MyFlexGrid.Col >= 0 && MyStepRTB.EditMode) // Only if a Cell is Selected
|
||||||
{
|
{
|
||||||
|
CellRange cr = MyFlexGrid.GetMergedRange(MyFlexGrid.Selection.r1, MyFlexGrid.Selection.c1); // B2018-127 get merged range
|
||||||
int row = MyFlexGrid.Row;
|
int row = MyFlexGrid.Row;
|
||||||
int col = MyFlexGrid.Col;
|
int col = MyFlexGrid.Col;
|
||||||
//SaveContents();
|
//SaveContents();
|
||||||
@ -1293,7 +1294,7 @@ namespace Volian.Controls.Library
|
|||||||
DoNotRefresh = false;
|
DoNotRefresh = false;
|
||||||
MyFlexGrid.Row = row;
|
MyFlexGrid.Row = row;
|
||||||
MyFlexGrid.Col = col;
|
MyFlexGrid.Col = col;
|
||||||
MyFlexGrid[MyFlexGrid.Row, MyFlexGrid.Col] = MyStepRTB.Rtf;
|
MyFlexGrid[cr.r1, cr.c1] = MyStepRTB.Rtf; // B2018-127 this saves to the first cell in a merged range
|
||||||
}
|
}
|
||||||
if (!MyFlexGrid.IsDirty) return;
|
if (!MyFlexGrid.IsDirty) return;
|
||||||
SaveContents();
|
SaveContents();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user