Skip to content

Commit ca7a89e

Browse files
committed
Save null offset if equal to default
1 parent 5045a17 commit ca7a89e

File tree

1 file changed

+6
-1
lines changed
  • common/src/main/java/dev/terminalmc/clientsort/client/gui/screen/edit

1 file changed

+6
-1
lines changed

common/src/main/java/dev/terminalmc/clientsort/client/gui/screen/edit/EditorScreen.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,12 @@ public void onClose() {
471471
* Saves any altered values, then calls {@link EditorScreen#onClose}.
472472
*/
473473
public void saveAndClose() {
474-
buttons.getFirst().savePolicy(buttons.getFirst().offset, ignoredSlots);
474+
buttons.getFirst().savePolicy(
475+
buttons.getFirst().offset.equals(options().layoutOffset)
476+
? null
477+
: buttons.getFirst().offset,
478+
ignoredSlots
479+
);
475480
Config.save();
476481
onClose();
477482
}

0 commit comments

Comments
 (0)