Commit d5ceef8b authored by Ilya Kirillov's avatar Ilya Kirillov

Fixed bug with selecting a table.

parent 356b0379
...@@ -5176,26 +5176,24 @@ CTable.prototype.SetSelectionUse = function(isUse) ...@@ -5176,26 +5176,24 @@ CTable.prototype.SetSelectionUse = function(isUse)
}; };
CTable.prototype.SetSelectionToBeginEnd = function(isSelectionStart, isElementStart) CTable.prototype.SetSelectionToBeginEnd = function(isSelectionStart, isElementStart)
{ {
var Pos;
if (false === isElementStart) if (false === isElementStart)
{ {
var Row = this.Content.length - 1; var Row = this.Content.length - 1;
var Cell = this.Content[Row].Get_CellsCount() - 1; var Cell = this.Content[Row].Get_CellsCount() - 1;
var Pos = {Row : Row, Cell : Cell};
if (isSelectionStart > 0) Pos = {Row : Row, Cell : Cell};
this.Selection.EndPos.Pos = Pos;
else
this.Selection.StartPos.Pos = Pos;
} }
else else
{ {
var Pos = {Row : 0, Cell : 0}; Pos = {Row : 0, Cell : 0};
}
if (isSelectionStart > 0) if (isSelectionStart)
this.Selection.StartPos.Pos = Pos; this.Selection.StartPos.Pos = Pos;
else else
this.Selection.EndPos.Pos = Pos; this.Selection.EndPos.Pos = Pos;
}
this.Internal_Selection_UpdateCells(); this.Internal_Selection_UpdateCells();
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment