diff --git a/apps/presentationeditor/main/app/controller/DocumentHolder.js b/apps/presentationeditor/main/app/controller/DocumentHolder.js index 2c009c0fa..ece6868f3 100644 --- a/apps/presentationeditor/main/app/controller/DocumentHolder.js +++ b/apps/presentationeditor/main/app/controller/DocumentHolder.js @@ -453,7 +453,7 @@ define([ showPoint[0] -= 3; showPoint[1] -= 3; } else { - value && (value.guideId = event.get_Guide()); + value && (value.guide = {guideId: event.get_Guide()}); } if (!menu.rendered) { @@ -2399,6 +2399,22 @@ define([ onLockViewProps: function(lock) { this.documentHolder && (this.documentHolder._state.viewPropsLock = lock); + + var me = this, + currentMenu = me.documentHolder.currentMenu; + if (currentMenu && currentMenu.isVisible() && me.documentHolder.slideMenu===currentMenu){ + if (me.api.asc_getCurrentFocusObject() !== 0 ){ // not thumbnails + if (!me._isDisabled && me.mode.isEdit) { // update slide menu items + var obj = me.fillMenuProps(me.api.getSelectedElements()); + if (obj) { + if (obj.menu_to_show===currentMenu) { + currentMenu.options.initMenu(obj.menu_props); + currentMenu.alignPosition(); + } + } + } + } + } }, SetDisabled: function(state) { diff --git a/apps/presentationeditor/main/app/view/DocumentHolder.js b/apps/presentationeditor/main/app/view/DocumentHolder.js index c498a4d0f..3bb73ee7b 100644 --- a/apps/presentationeditor/main/app/view/DocumentHolder.js +++ b/apps/presentationeditor/main/app/view/DocumentHolder.js @@ -1030,8 +1030,10 @@ define([ if (!value.fromThumbs) { me.mnuGuides.menu.items[0].setChecked(me.api.asc_getShowGuides(), true); - me.mnuGuides.menu.items[4].setVisible(!!value.guideId); - me.mnuGuides.menu.items[4].options.guideId = value.guideId; + if (value.guide) { // change visibility only on asc_onContextMenu event + me.mnuGuides.menu.items[4].setVisible(!!value.guide.guideId); + me.mnuGuides.menu.items[4].options.guideId = value.guide.guideId; + } me.mnuGuides.menu.items[6].setChecked(me.api.asc_getShowSmartGuides(), true); me.mnuGuides.menu.items[2].setDisabled(me._state.viewPropsLock);