Commit f645d565 authored by SergeyLuzyanin's avatar SergeyLuzyanin

fix Bug 35468

parent 76226ab6
...@@ -3346,6 +3346,7 @@ function CDrawingDocument() ...@@ -3346,6 +3346,7 @@ function CDrawingDocument()
this.Notes_OnRecalculate = function(slideNum, width, height) this.Notes_OnRecalculate = function(slideNum, width, height)
{ {
console.log('Notes_OnRecalculate: ' + slideNum);
if (!this.m_oWordControl.IsSupportNotes) if (!this.m_oWordControl.IsSupportNotes)
return; return;
......
...@@ -276,9 +276,12 @@ ...@@ -276,9 +276,12 @@
}; };
CNotes.prototype.showDrawingObjects = function(){ CNotes.prototype.showDrawingObjects = function(){
var oPresentation = editor.WordControl.m_oLogicDocument;
if(this.slide){ if(this.slide){
if(oPresentation.CurPage === this.slide.num){
editor.WordControl.m_oDrawingDocument.Notes_OnRecalculate(this.slide.num, this.slide.NotesWidth, this.slide.getNotesHeight()); editor.WordControl.m_oDrawingDocument.Notes_OnRecalculate(this.slide.num, this.slide.NotesWidth, this.slide.getNotesHeight());
} }
}
}; };
CNotes.prototype.OnUpdateOverlay = function() CNotes.prototype.OnUpdateOverlay = function()
......
...@@ -3559,6 +3559,9 @@ CPresentation.prototype = ...@@ -3559,6 +3559,9 @@ CPresentation.prototype =
Notes_OnMouseUp : function(e, X, Y) Notes_OnMouseUp : function(e, X, Y)
{ {
if(!this.FocusOnNotes){
return;
}
var oCurSlide = this.Slides[this.CurPage]; var oCurSlide = this.Slides[this.CurPage];
if(oCurSlide && oCurSlide.notes){ if(oCurSlide && oCurSlide.notes){
e.ctrlKey = e.CtrlKey; e.ctrlKey = e.CtrlKey;
...@@ -3581,6 +3584,9 @@ CPresentation.prototype = ...@@ -3581,6 +3584,9 @@ CPresentation.prototype =
Notes_OnMouseMove : function(e, X, Y) Notes_OnMouseMove : function(e, X, Y)
{ {
// if(!this.FocusOnNotes){
// return;
// }
var oCurSlide = this.Slides[this.CurPage]; var oCurSlide = this.Slides[this.CurPage];
if(oCurSlide){ if(oCurSlide){
if(oCurSlide.notes){ if(oCurSlide.notes){
...@@ -4265,18 +4271,17 @@ CPresentation.prototype = ...@@ -4265,18 +4271,17 @@ CPresentation.prototype =
return; return;
} }
var oldCurPage = this.CurPage; var nNewCurrentPage = Math.min( this.Slides.length - 1, Math.max( 0, PageNum ) );
this.CurPage = Math.min( this.Slides.length - 1, Math.max( 0, PageNum ) ); if(nNewCurrentPage !== this.CurPage && this.CurPage < this.Slides.length)
if(oldCurPage != this.CurPage && this.CurPage < this.Slides.length)
{ {
this.FocusOnNotes = false; var oCurrentController = this.GetCurrentController();
if(this.Slides[oldCurPage]) if(oCurrentController){
{ oCurrentController.resetSelectionState();
this.Slides[oldCurPage].graphicObjects.resetSelectionState();
} }
if(!this.Notes_OnResize()){ this.CurPage = nNewCurrentPage;
this.FocusOnNotes = false;
this.Notes_OnResize();
this.DrawingDocument.Notes_OnRecalculate(this.CurPage, this.Slides[this.CurPage].NotesWidth, this.Slides[this.CurPage].getNotesHeight()); this.DrawingDocument.Notes_OnRecalculate(this.CurPage, this.Slides[this.CurPage].NotesWidth, this.Slides[this.CurPage].getNotesHeight());
}
editor.asc_hideComments(); editor.asc_hideComments();
this.Document_UpdateInterfaceState(); this.Document_UpdateInterfaceState();
} }
......
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