Commit 759b0197 authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

Bug 31233 - При нажатии границ градиента происходит переход в предыдущее меню...

Bug 31233 - При нажатии границ градиента происходит переход в предыдущее меню если там были совершены изменения

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@67055 954022d7-b5bf-4e40-9824-e11837661b57
parent b4f16c9c
......@@ -390,7 +390,7 @@ function DrawingObjects() {
_this.asyncImagesDocumentEndLoaded = null;
_this.nCurPointItemsLength = 0;
_this.nCurPointItemsLength = -1;
// Task timer
var aDrawTasks = [];
......@@ -2690,11 +2690,16 @@ function DrawingObjects() {
{
if( !api.noCreatePoint && !api.exucuteHistory && api.exucuteHistoryEnd)
{
_this.controller.setGraphicObjectPropsCallBack(props);
_this.controller.startRecalculate();
_this.sendGraphicObjectProps();
if(_this.nCurPointItemsLength === -1){
_this.controller.setGraphicObjectProps( props );
}
else{
_this.controller.setGraphicObjectPropsCallBack(props);
_this.controller.startRecalculate();
_this.sendGraphicObjectProps();
}
api.exucuteHistoryEnd = false;
_this.nCurPointItemsLength = 0;
_this.nCurPointItemsLength = -1;
}
else
{
......@@ -2702,38 +2707,55 @@ function DrawingObjects() {
}
if(api.exucuteHistory)
{
if(History.CurPoint)
var Point = History.Points[History.Index];
if(Point)
{
_this.nCurPointItemsLength = History.CurPoint.Items.length;
_this.nCurPointItemsLength = Point.Items.length;
}
else
{
_this.nCurPointItemsLength = 0;
_this.nCurPointItemsLength = -1;
}
api.exucuteHistory = false;
}
}
else
{
if(History.CurPoint && History.CurPoint.Items.length > 0)
var Point = History.Points[History.Index];
if(Point && Point.Items.length > 0)
{
var Point = History.CurPoint;
var nBottomIndex = this.nCurPointItemsLength - 1;
for ( var Index = Point.Items.length - 1; Index > nBottomIndex; Index-- )
{
var Item = Point.Items[Index];
if(!Item.Class.Read_FromBinary2)
Item.Class.Undo( Item.Type, Item.Data, Item.SheetId );
if(this.nCurPointItemsLength > -1){
var nBottomIndex = - 1;
for ( var Index = Point.Items.length - 1; Index > nBottomIndex; Index-- )
{
var Item = Point.Items[Index];
if(!Item.Class.Read_FromBinary2)
Item.Class.Undo( Item.Type, Item.Data, Item.SheetId );
else
Item.Class.Undo(Item.Data);
}
_this.controller.setSelectionState(Point.SelectionState);
Point.Items.length = 0;
_this.controller.setGraphicObjectPropsCallBack(props);
_this.controller.startRecalculate();
}
else{
_this.controller.setGraphicObjectProps( props );
var Point = History.Points[History.Index];
if(Point)
{
_this.nCurPointItemsLength = Point.Items.length;
}
else
Item.Class.Undo(Item.Data);
{
_this.nCurPointItemsLength = -1;
}
}
Point.Items.length = this.nCurPointItemsLength;
_this.controller.setGraphicObjectPropsCallBack(props);
_this.controller.startRecalculate();
}
}
// _this.controller.setGraphicObjectProps( objectProperties );
}
};
......
......@@ -1759,10 +1759,6 @@ CPresentation.prototype =
if(this.Slides[this.CurPage])
{
this.Slides[this.CurPage].graphicObjects.checkSelectedObjectsAndCallback(this.Slides[this.CurPage].graphicObjects.applyDrawingProps, [shapeProps], false, historydescription_Presentation_SetShapeProps);
if(shapeProps.textArtProperties && typeof shapeProps.textArtProperties.asc_getForm() === "string")
{
this
}
}
this.Document_UpdateInterfaceState();
......
......@@ -62,7 +62,7 @@ function asc_docs_api(name)
this.isLoadNoCutFonts = false;
this.nCurPointItemsLength = 0;
this.nCurPointItemsLength = -1;
this.pasteCallback = null;
this.pasteImageMap = null;
......@@ -1806,16 +1806,23 @@ asc_docs_api.prototype.ShapeApply = function(prop)
{
if(!this.noCreatePoint || this.exucuteHistory)
{
if( !this.noCreatePoint && !this.exucuteHistory && this.exucuteHistoryEnd)
if(!this.noCreatePoint && !this.exucuteHistory && this.exucuteHistoryEnd)
{
History.UndoLastPoint(this.nCurPointItemsLength);
var slide = this.WordControl.m_oLogicDocument.Slides[this.WordControl.m_oLogicDocument.CurPage];
slide.graphicObjects.applyDrawingProps(prop);
slide.graphicObjects.recalculate();
this.WordControl.m_oDrawingDocument.OnRecalculatePage(this.WordControl.m_oLogicDocument.CurPage, slide);
this.WordControl.m_oDrawingDocument.OnEndRecalculate();
if(-1 !== this.nCurPointItemsLength)
{
History.UndoLastPoint();
var slide = this.WordControl.m_oLogicDocument.Slides[this.WordControl.m_oLogicDocument.CurPage];
slide.graphicObjects.applyDrawingProps(prop);
slide.graphicObjects.recalculate();
this.WordControl.m_oDrawingDocument.OnRecalculatePage(this.WordControl.m_oLogicDocument.CurPage, slide);
this.WordControl.m_oDrawingDocument.OnEndRecalculate();
}
else
{
this.WordControl.m_oLogicDocument.ShapeApply(prop);
}
this.exucuteHistoryEnd = false;
this.nCurPointItemsLength = 0;
this.nCurPointItemsLength = -1;
}
else
{
......@@ -1828,6 +1835,10 @@ asc_docs_api.prototype.ShapeApply = function(prop)
{
this.nCurPointItemsLength = oPoint.Items.length;
}
else
{
this.nCurPointItemsLength = -1;
}
this.exucuteHistory = false;
}
}
......@@ -1835,12 +1846,28 @@ asc_docs_api.prototype.ShapeApply = function(prop)
{
if(this.WordControl.m_oLogicDocument.Slides[this.WordControl.m_oLogicDocument.CurPage])
{
History.UndoLastPoint(this.nCurPointItemsLength);
var slide = this.WordControl.m_oLogicDocument.Slides[this.WordControl.m_oLogicDocument.CurPage];
slide.graphicObjects.applyDrawingProps(prop);
slide.graphicObjects.recalculate();
this.WordControl.m_oDrawingDocument.OnRecalculatePage(this.WordControl.m_oLogicDocument.CurPage, slide);
this.WordControl.m_oDrawingDocument.OnEndRecalculate();
if(-1 !== this.nCurPointItemsLength)
{
History.UndoLastPoint();
var slide = this.WordControl.m_oLogicDocument.Slides[this.WordControl.m_oLogicDocument.CurPage];
slide.graphicObjects.applyDrawingProps(prop);
slide.graphicObjects.recalculate();
this.WordControl.m_oDrawingDocument.OnRecalculatePage(this.WordControl.m_oLogicDocument.CurPage, slide);
this.WordControl.m_oDrawingDocument.OnEndRecalculate();
}
else
{
this.WordControl.m_oLogicDocument.ShapeApply(prop);
var oPoint = History.Points[History.Index];
if(oPoint)
{
this.nCurPointItemsLength = oPoint.Items.length;
}
else
{
this.nCurPointItemsLength = -1;
}
}
}
}
}
......
......@@ -178,6 +178,7 @@ CHistory.prototype =
oItem.Class.Undo(oItem.Data);
}
oPoint.Items.length = _bottomIndex + 1;
this.Document.Set_SelectionState( oPoint.State );
}
},
......
......@@ -332,7 +332,7 @@ function asc_docs_api(name)
this.SelectedObjectsStack = [];
this.nCurPointItemsLength = 0;
this.nCurPointItemsLength = -1;
this.isDocumentEditor = true;
this.CurrentTranslate = translations_map["en"];
......@@ -4487,10 +4487,17 @@ asc_docs_api.prototype.ImgApply = function(obj)
{
if( !this.noCreatePoint && !this.exucuteHistory && this.exucuteHistoryEnd)
{
History.UndoLastPoint(this.nCurPointItemsLength);
if(-1 !== this.nCurPointItemsLength)
{
History.UndoLastPoint();
}
else
{
History.Create_NewPoint(historydescription_Document_ApplyImagePr);
}
this.WordControl.m_oLogicDocument.Set_ImageProps( ImagePr );
this.exucuteHistoryEnd = false;
this.nCurPointItemsLength = 0;
this.nCurPointItemsLength = -1;
}
else
{
......@@ -4509,10 +4516,25 @@ asc_docs_api.prototype.ImgApply = function(obj)
}
else
{
//ExecuteNoHistory(function(){
History.UndoLastPoint(this.nCurPointItemsLength);
this.WordControl.m_oLogicDocument.Set_ImageProps( ImagePr );
//}, this, []);
var bNeedCheckChangesCount = false;
if(-1 !== this.nCurPointItemsLength)
{
History.UndoLastPoint();
}
else
{
bNeedCheckChangesCount = true;
History.Create_NewPoint(historydescription_Document_ApplyImagePr);
}
this.WordControl.m_oLogicDocument.Set_ImageProps( ImagePr );
if(bNeedCheckChangesCount)
{
var oPoint = History.Points[History.Index];
if(oPoint)
{
this.nCurPointItemsLength = oPoint.Items.length;
}
}
}
}
}
......
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