Commit 9bf1a693 authored by Ilya Kirillov's avatar Ilya Kirillov

Fixed bug with no creating history point before paste formatting.

parent 34414fc0
...@@ -6630,7 +6630,11 @@ CDocument.prototype.OnKeyDown = function(e) ...@@ -6630,7 +6630,11 @@ CDocument.prototype.OnKeyDown = function(e)
{ {
if (true === e.ShiftKey) // Ctrl + Shift + V - вставка форматирования текста if (true === e.ShiftKey) // Ctrl + Shift + V - вставка форматирования текста
{ {
this.Document_Format_Paste(); if (false === this.Document_Is_SelectionLocked(changestype_Paragraph_Content))
{
this.Create_NewHistoryPoint(AscDFH.historydescription_Document_FormatPasteHotKey);
this.Document_Format_Paste();
}
bRetValue = keydownresult_PreventAll; bRetValue = keydownresult_PreventAll;
} }
} }
...@@ -7075,8 +7079,7 @@ CDocument.prototype.OnMouseUp = function(e, X, Y, PageIndex) ...@@ -7075,8 +7079,7 @@ CDocument.prototype.OnMouseUp = function(e, X, Y, PageIndex)
if (c_oAscFormatPainterState.kOn === editor.isPaintFormat) if (c_oAscFormatPainterState.kOn === editor.isPaintFormat)
editor.sync_PaintFormatCallback(c_oAscFormatPainterState.kOff); editor.sync_PaintFormatCallback(c_oAscFormatPainterState.kOff);
} }
else if (true === editor.isMarkerFormat && true === this.Is_TextSelectionUse())
if (true === editor.isMarkerFormat && true === this.Is_TextSelectionUse())
{ {
if (false === this.Document_Is_SelectionLocked(changestype_Paragraph_Content)) if (false === this.Document_Is_SelectionLocked(changestype_Paragraph_Content))
{ {
...@@ -7101,6 +7104,10 @@ CDocument.prototype.OnMouseUp = function(e, X, Y, PageIndex) ...@@ -7101,6 +7104,10 @@ CDocument.prototype.OnMouseUp = function(e, X, Y, PageIndex)
editor.sync_MarkerFormatCallback(true); editor.sync_MarkerFormatCallback(true);
} }
} }
else
{
}
} }
this.private_UpdateCursorXY(true, true); this.private_UpdateCursorXY(true, true);
......
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