Skip to content

Commit

Permalink
fix: Java memory is not edited if the global setting is manual
Browse files Browse the repository at this point in the history
  • Loading branch information
ci010 committed Nov 17, 2024
1 parent b98efb9 commit f0ed969
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions xmcl-keystone-ui/src/composables/instanceEdit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,23 @@ export function useInstanceEdit(instance: Ref<Instance>, edit: (instance: EditIn
})
const minMemory = computed({
get: () => data.minMemory ?? globalMinMemory.value,
set: (v) => { set(data, 'minMemory', v); saveJIT() },
set: (v) => {
if (data.assignMemory !== true) {
set(data, 'assignMemory', true)
}
set(data, 'minMemory', v)
saveJIT()
},
})
const maxMemory = computed({
get: () => data.maxMemory ?? globalMaxMemory.value,
set: (v) => { set(data, 'maxMemory', v); saveJIT() },
set: (v) => {
if (data.assignMemory !== true) {
set(data, 'assignMemory', true)
}
set(data, 'maxMemory', v)
saveJIT()
},
})
const vmOptions = computed({
get: () => data.vmOptions ?? globalVmOptions.value.join(' '),
Expand Down

0 comments on commit f0ed969

Please sign in to comment.