calc: Properly handle the disable state
Doesn't hide the grid when the Function wizard is open anymore when disabling the ToggleSheetGrid button. Depends on https://gerrit.libreoffice.org/c/core/+/167370 This is a follow up for issue #8066. Signed-off-by: Hubert Figuière <hub@collabora.com> Change-Id: I79ba99716eb1103e7239fe5cc302c64827c9ef53pull/8771/merge
parent
f4265ce8a7
commit
dbd3bc1482
|
@ -841,10 +841,14 @@ L.CalcTileLayer = L.CanvasTileLayer.extend({
|
|||
this.insertMode = e.state.trim() === '' ? false: true;
|
||||
}
|
||||
else if (e.commandName === '.uno:ToggleSheetGrid') {
|
||||
let newState = e.state.trim() === 'true';
|
||||
if (this._sheetGrid != newState) {
|
||||
this._sheetGrid = newState;
|
||||
this._painter._sectionContainer.requestReDraw();
|
||||
let trimmedState = e.state.trim();
|
||||
// Disabled mean we don't change the sheet grid state.
|
||||
if (trimmedState != 'disabled') {
|
||||
let newState = trimmedState === 'true';
|
||||
if (this._sheetGrid != newState) {
|
||||
this._sheetGrid = newState;
|
||||
this._painter._sectionContainer.requestReDraw();
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue