Commit 73cb7d64 authored by Ilya Kirillov's avatar Ilya Kirillov

Fixed several bugs with selecting a drawing object placed in a header on a...

Fixed several bugs with selecting a drawing object placed in a header on a second page of the document.
parent 1bf806af
......@@ -7454,7 +7454,7 @@ CDocumentContent.prototype.Selection_SetEnd = function(X, Y, CurPage, M
if (docpostype_DrawingObjects === this.CurPos.Type)
{
var PageAbs = (this.Parent instanceof CHeaderFooter ? CurPage : this.Get_StartPage_Absolute(CurPage));
var PageAbs = this.Get_StartPage_Absolute(CurPage);
if (AscCommon.g_mouse_event_type_up == MouseEvent.Type)
{
this.LogicDocument.DrawingObjects.OnMouseUp(MouseEvent, X, Y, PageAbs);
......
......@@ -2107,10 +2107,8 @@ CHeaderFooterController.prototype =
if (null !== TempHdrFtr)
this.CurHdrFtr = TempHdrFtr;
var NewPos = this.DrawingDocument.ConvertCoordsToAnotherPage(X, Y, PageIndex, this.CurPage);
var _X = NewPos.X;
var _Y = NewPos.Y;
this.CurHdrFtr.Selection_SetStart( _X, _Y, this.CurPage, MouseEvent );
this.CurPage = PageIndex;
this.CurHdrFtr.Selection_SetStart(X, Y, PageIndex, MouseEvent);
this.ChangeCurPageOnEnd = false;
this.WaitMouseDown = false;
......
......@@ -9110,9 +9110,10 @@ Paragraph.prototype =
var PageAbs = this.Get_AbsolutePage(CurPage);
var ColumnAbs = this.Get_AbsoluteColumn(CurPage);
var PageRel = PageAbs - this.Parent.Get_AbsolutePage(0);
var PageLimits = this.Parent.Get_PageLimits(this.Get_AbsolutePage(PageAbs));
var PageFields = this.Parent.Get_PageFields(this.Get_AbsolutePage(PageAbs));
var PageLimits = this.Parent.Get_PageLimits(PageRel);
var PageFields = this.Parent.Get_PageFields(PageRel);
var _CurPage = 0;
if (0 !== PageAbs && CurPage > ColumnAbs)
......
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