Commit a307ad4e authored by Ilya Kirillov's avatar Ilya Kirillov

Fixed bug #34573

parent f8e1ccf8
......@@ -303,16 +303,25 @@ CHeaderFooter.prototype =
return { X : this.Content.X, Y : 0, XLimit : this.Content.XLimit, YLimit : 0 };
},
Set_CurrentElement : function(bUpdateStates)
Set_CurrentElement : function(bUpdateStates, PageAbs)
{
var PageIndex = -1;
if (undefined !== PageAbs && null !== PageAbs && this.Parent.Pages[PageAbs])
{
if ((this === this.Parent.Pages[PageAbs].Header || this === this.Parent.Pages[PageAbs].Footer))
PageIndex = PageAbs;
}
if (-1 === PageIndex)
{
for (var Key in this.Parent.Pages)
{
var PIndex = Key | 0;
if ((this === this.Parent.Pages[PIndex].Header || this === this.Parent.Pages[PIndex].Footer) && (-1 === PageIndex || PageIndex > PIndex))
PageIndex = PIndex;
}
}
this.Parent.CurHdrFtr = this;
this.Parent.WaitMouseDown = 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