Commit 2fb22f4d authored by Ilya Kirillov's avatar Ilya Kirillov

Fixed bug #34101.

parent 2342fdb5
...@@ -774,15 +774,19 @@ ParaComment.prototype = ...@@ -774,15 +774,19 @@ ParaComment.prototype =
Page = HdrFtr.RecalcInfo.CurPage; Page = HdrFtr.RecalcInfo.CurPage;
} }
if ( true === this.Start ) if (Para && Para === AscCommon.g_oTableId.Get_ById(Para.Get_Id()))
{ {
Comment.Set_StartId( Para.Get_Id() ); // Заглушка для повторяющегося заголовка в таблицах
Comment.Set_StartInfo( Page, X, Y, H ); if (true === this.Start)
} {
else Comment.Set_StartId(Para.Get_Id());
{ Comment.Set_StartInfo(Page, X, Y, H);
Comment.Set_EndId( Para.Get_Id() ); }
} else
{
Comment.Set_EndId(Para.Get_Id());
}
}
}, },
Recalculate_PageEndInfo : function(PRSI, _CurLine, _CurRange) Recalculate_PageEndInfo : function(PRSI, _CurLine, _CurRange)
......
...@@ -7206,15 +7206,24 @@ CDocument.prototype.OnMouseUp = function(e, X, Y, PageIndex) ...@@ -7206,15 +7206,24 @@ CDocument.prototype.OnMouseUp = function(e, X, Y, PageIndex)
var Comment_X = this.Get_PageLimits(PageIndex).XLimit; var Comment_X = this.Get_PageLimits(PageIndex).XLimit;
var Para = g_oTableId.Get_ById(Comment.StartId); var Para = g_oTableId.Get_ById(Comment.StartId);
var TextTransform = Para.Get_ParentTextTransform(); if (!Para)
if (TextTransform)
{ {
Comment_Y = TextTransform.TransformPointY(Comment.m_oStartInfo.X, Comment.m_oStartInfo.Y); // Такое может быть, если комментарий добавлен к заголовку таблицы
this.Select_Comment(null, false);
editor.sync_HideComment();
} }
else
{
var TextTransform = Para.Get_ParentTextTransform();
if (TextTransform)
{
Comment_Y = TextTransform.TransformPointY(Comment.m_oStartInfo.X, Comment.m_oStartInfo.Y);
}
var Coords = this.DrawingDocument.ConvertCoordsToCursorWR(Comment_X, Comment_Y, Comment_PageNum); var Coords = this.DrawingDocument.ConvertCoordsToCursorWR(Comment_X, Comment_Y, Comment_PageNum);
this.Select_Comment(Comment.Get_Id(), false); this.Select_Comment(Comment.Get_Id(), false);
editor.sync_ShowComment(Comment.Get_Id(), Coords.X, Coords.Y); editor.sync_ShowComment(Comment.Get_Id(), Coords.X, Coords.Y);
}
} }
else else
{ {
......
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