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

Bug 24447 - Сбрасывается выделение с текста в автофигуре, при открытии контекстного меню

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57179 954022d7-b5bf-4e40-9824-e11837661b57
parent 78fb2052
...@@ -251,8 +251,8 @@ DrawingObjectsController.prototype = ...@@ -251,8 +251,8 @@ DrawingObjectsController.prototype =
} }
if(this.selection.textSelection) if(this.selection.textSelection)
{ {
var content = this.selection.textSelection.getDocContent(); // var content = this.selection.textSelection.getDocContent();
content && content.Selection_Remove(); // content && content.Selection_Remove();
this.selection.textSelection = null; this.selection.textSelection = null;
} }
if(this.selection.chartSelection) if(this.selection.chartSelection)
......
...@@ -2724,7 +2724,19 @@ CShape.prototype = ...@@ -2724,7 +2724,19 @@ CShape.prototype =
var tx, ty; var tx, ty;
tx = this.invertTransformText.TransformPointX(x, y); tx = this.invertTransformText.TransformPointX(x, y);
ty = this.invertTransformText.TransformPointY(x, y); ty = this.invertTransformText.TransformPointY(x, y);
content.Selection_SetStart(tx, ty, slideIndex, e); if(e.Button === g_mouse_button_right)
{
if(content.Selection_Check(tx, ty, 0))
{
this.rightButtonFlag = true;
return;
}
}
if(!(content.Is_TextSelectionUse() && e.ShiftKey))
content.Selection_SetStart(tx, ty, slideIndex, e);
else
content.Selection_SetEnd(tx, ty, slideIndex, e);
} }
}, },
...@@ -2735,8 +2747,12 @@ CShape.prototype = ...@@ -2735,8 +2747,12 @@ CShape.prototype =
var tx, ty; var tx, ty;
tx = this.invertTransformText.TransformPointX(x, y); tx = this.invertTransformText.TransformPointX(x, y);
ty = this.invertTransformText.TransformPointY(x, y); ty = this.invertTransformText.TransformPointY(x, y);
content.Selection_SetEnd(tx, ty, slideIndex, e); if(!(e.Type === g_mouse_event_type_up && this.rightButtonFlag))
{
content.Selection_SetEnd(tx, ty, slideIndex, e);
}
} }
delete this.rightButtonFlag;
}, },
Get_Theme: function() Get_Theme: function()
......
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