Commit 15b8b847 authored by Ilya Kirillov's avatar Ilya Kirillov

Fixed a problem in the work of locks in class CInlineLevelSdt.

parent 82638d8f
......@@ -389,6 +389,24 @@ Paragraph.prototype.Document_Is_SelectionLocked = function(CheckType)
arrContentControls[nIndex].Document_Is_SelectionLocked(CheckType);
}
// Проверка для специального случая, когда мы переносим текст из параграфа в него самого. В такой ситуации надо
// проверять не только выделенную часть, но и место куда происходит вставка/перенос.
if (this.NearPosArray.length > 0)
{
var ParaState = this.GetSelectionState();
this.Selection.Use = false;
this.Set_ParaContentPos(this.NearPosArray[0].NearPos.ContentPos, true, -1, -1);
arrContentControls = this.GetSelectedContentControls();
for (var nIndex = 0, nCount = arrContentControls.length; nIndex < nCount; ++nIndex)
{
if (false === arrContentControls[nIndex].IsSelectionUse())
arrContentControls[nIndex].Document_Is_SelectionLocked(CheckType);
}
this.SetSelectionState(ParaState, 0);
}
var bCheckContentControl = false;
switch ( CheckType )
{
......
......@@ -5539,7 +5539,8 @@ CDocument.prototype.On_DragTextEnd = function(NearPos, bCopy)
if (false === this.Can_InsertContent(DocContent, NearPos))
{
History.Remove_LastPoint();
this.History.Remove_LastPoint();
NearPos.Paragraph.Clear_NearestPosArray();
return;
}
......@@ -5565,7 +5566,7 @@ CDocument.prototype.On_DragTextEnd = function(NearPos, bCopy)
if (false === Para.Is_UseInDocument())
{
this.Document_Undo();
History.Clear_Redo();
this.History.Clear_Redo();
return;
}
}
......@@ -5582,7 +5583,10 @@ CDocument.prototype.On_DragTextEnd = function(NearPos, bCopy)
this.Document_UpdateRulersState();
}
else
History.Remove_LastPoint();
{
this.History.Remove_LastPoint();
NearPos.Paragraph.Clear_NearestPosArray();
}
}
};
/**
......
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