Commit a307ad4e authored by Ilya Kirillov's avatar Ilya Kirillov

Fixed bug #34573

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