Skip to content

Commit

Permalink
[PE] Fix the locking of the slide background settings buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
Basher0303 committed Feb 7, 2024
1 parent 71a4653 commit ca1d57e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 0 additions & 1 deletion apps/presentationeditor/main/app/controller/RightMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ define([
this._settings[settingsType].lockedBackground = value.get_LockBackground();
/*this._settings[settingsType].lockedEffects = value.get_LockTransition();
this._settings[settingsType].lockedTransition = value.get_LockTransition();*/
this._settings[settingsType].lockedHeader = !!value.get_LockHeader && value.get_LockHeader();
} else {
this._settings[settingsType].locked = value.get_Locked();
if (settingsType == Common.Utils.documentSettingsType.Shape) {
Expand Down
12 changes: 7 additions & 5 deletions apps/presentationeditor/main/app/view/SlideSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -1202,7 +1202,7 @@ define([
ChangeSettings: function(props) {
if (this._initSettings)
this.createDelayedElements();
this.SetSlideDisabled(this._locked.background, this._locked.header);
this.SetSlideDisabled(this._locked.background, this._locked.header, props);

if (props)
{
Expand Down Expand Up @@ -1480,9 +1480,6 @@ define([
this._state.GradColor = color;
}

this.btnBackgroundReset.setDisabled(!!props.get_LockResetBackground());
this.btnApplyAllSlides.setDisabled(!!props.get_LockApplyBackgroundToAll());

this.chBackgroundGraphics.setValue(!!props.get_ShowMasterSp(), true);

value = this.api.asc_getHeaderFooterProperties();
Expand All @@ -1502,12 +1499,17 @@ define([
};
},

SetSlideDisabled: function(background, header) {
SetSlideDisabled: function(background, header, props) {
this._locked = {
background: background, header: header
};
if (this._initSettings) return;

if(props) {
this.btnBackgroundReset.setDisabled(!!props.get_LockResetBackground() || background);
this.btnApplyAllSlides.setDisabled(!!props.get_LockApplyBackgroundToAll());
}

if (background !== this._stateDisabled.background) {
this.cmbFillSrc.setDisabled(background);
for (var i=0; i<this.FillItems.length; i++) {
Expand Down

0 comments on commit ca1d57e

Please sign in to comment.