i am not smart enough for this lol

This commit is contained in:
tim h 2022-12-12 19:52:14 -06:00
parent 4241cbd4f9
commit 55e361b6e3
2 changed files with 17 additions and 15 deletions

View file

@ -1017,10 +1017,12 @@ function resetToDefaults() {
function informCursorSizeSlider() {
if (stableDiffusionData.sync_cursor_size) {
if (!toolbar._current_tool.state.ignorePrevious) {
toolbar._current_tool.state.setCursorSize(stableDiffusionData.width);
if (toolbar._current_tool) {
if (!toolbar._current_tool.state.ignorePrevious) {
toolbar._current_tool.state.setCursorSize(stableDiffusionData.width);
}
toolbar._current_tool.state.ignorePrevious = false;
}
toolbar._current_tool.state.ignorePrevious = false;
}
}

View file

@ -990,12 +990,12 @@ const dreamTool = () =>
max: 2048,
step: 128,
textStep: 2,
cb: () => {
if (stableDiffusionData.sync_cursor_size) {
state.ignorePrevious = true;
resSlider.value = state.cursorSize;
}
},
// cb: () => {
// if (stableDiffusionData.sync_cursor_size) {
// state.ignorePrevious = true;
// resSlider.value = state.cursorSize;
// }
// },
}
);
@ -1242,12 +1242,12 @@ const img2imgTool = () =>
max: 2048,
step: 128,
textStep: 2,
// cb: () => {
// if (stableDiffusionData.sync_cursor_size) {
// state.ignorePrevious = true;
// resSlider.value = state.cursorSize;
// }
// },
cb: () => {
if (stableDiffusionData.sync_cursor_size) {
state.ignorePrevious = true;
resSlider.value = state.cursorSize;
}
},
}
);