mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 21:42:51 -05:00
displays: fix reverted state for position
This commit is contained in:
@@ -672,28 +672,25 @@ Item {
|
||||
|
||||
function revertChanges() {
|
||||
const hadFormatChange = originalDisplayNameMode !== "";
|
||||
|
||||
if (hadFormatChange) {
|
||||
SettingsData.displayNameMode = originalDisplayNameMode;
|
||||
SettingsData.saveSettings();
|
||||
}
|
||||
|
||||
if (originalOutputs) {
|
||||
const original = JSON.parse(JSON.stringify(originalOutputs));
|
||||
backendWriteOutputsConfig(original);
|
||||
pendingChanges = {};
|
||||
originalOutputs = null;
|
||||
originalDisplayNameMode = "";
|
||||
outputs = {};
|
||||
Qt.callLater(() => {
|
||||
root.outputs = original;
|
||||
});
|
||||
} else if (hadFormatChange) {
|
||||
const currentOutputs = buildOutputsWithPendingChanges();
|
||||
backendWriteOutputsConfig(currentOutputs);
|
||||
clearPendingChanges();
|
||||
} else {
|
||||
if (!originalOutputs) {
|
||||
if (hadFormatChange)
|
||||
backendWriteOutputsConfig(buildOutputsWithPendingChanges());
|
||||
clearPendingChanges();
|
||||
return;
|
||||
}
|
||||
|
||||
const original = JSON.parse(JSON.stringify(originalOutputs));
|
||||
backendWriteOutputsConfig(original);
|
||||
pendingChanges = {};
|
||||
originalOutputs = null;
|
||||
originalDisplayNameMode = "";
|
||||
outputs = original;
|
||||
}
|
||||
|
||||
function getOutputBounds() {
|
||||
|
||||
Reference in New Issue
Block a user