rename 'Continue Session' btn to 'Reuse Selection'
parent
f819cece38
commit
fc42949830
2
index.js
2
index.js
|
|
@ -1276,7 +1276,7 @@ function pastImage2Layer() {
|
|||
],
|
||||
{
|
||||
synchronousExecution: true,
|
||||
modalBehavior: 'fail',
|
||||
modalBehavior: 'execute',
|
||||
}
|
||||
)
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1111,11 +1111,13 @@ async function black_white_layer_to_mask_multi_batchplay(
|
|||
|
||||
await timer(g_timer_value)
|
||||
await executeAsModal(async () => {
|
||||
await layer_util.toggleActiveLayer() // toggle active layer will be visible, note: doesn't solve the issue in outpaint mode
|
||||
result = await psAction.batchPlay(command2, {})
|
||||
})
|
||||
|
||||
await timer(g_timer_value)
|
||||
await executeAsModal(async () => {
|
||||
await layer_util.toggleActiveLayer() // undo the toggling operation, active layer will be visible, note: doesn't solve the issue in outpaint mode
|
||||
result = await psAction.batchPlay(command3, {})
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ const ToolbarGenerateButtons = observer(() => {
|
|||
return (
|
||||
<div>
|
||||
<button
|
||||
title={Locale("Generate")}
|
||||
title={Locale('Generate')}
|
||||
className="btnSquare generateColor"
|
||||
onClick={handleGenerate}
|
||||
style={{ ...button_style, display: generate_display }}
|
||||
|
|
@ -100,7 +100,7 @@ const ToolbarGenerateButtons = observer(() => {
|
|||
G
|
||||
</button>
|
||||
<button
|
||||
title={Locale("Generate More")}
|
||||
title={Locale('Generate More')}
|
||||
onClick={handleGenerateMore}
|
||||
className={'btnSquare generateMoreColor'}
|
||||
style={{
|
||||
|
|
@ -111,7 +111,7 @@ const ToolbarGenerateButtons = observer(() => {
|
|||
M
|
||||
</button>
|
||||
<button
|
||||
title={Locale("Interrupt")}
|
||||
title={Locale('Interrupt')}
|
||||
onClick={handleInterrupt}
|
||||
className="btnSquare"
|
||||
style={{
|
||||
|
|
@ -139,7 +139,8 @@ const canStartSession = async () => {
|
|||
can_start_session = true
|
||||
} else {
|
||||
can_start_session = await note.Notification.inactiveSelectionArea(
|
||||
session_ts.store.data.is_active
|
||||
session_ts.store.data.is_active,
|
||||
'Reuse Selection'
|
||||
)
|
||||
if (can_start_session) {
|
||||
//end current session and start a new one
|
||||
|
|
|
|||
|
|
@ -245,10 +245,10 @@ export class Txt2ImgMode extends Mode {
|
|||
session_ts.store.data.controlnet_input_image =
|
||||
await io.getImg2ImgInitImage()
|
||||
}
|
||||
console.log(
|
||||
'session_ts.store.data.controlnet_input_image: ',
|
||||
session_ts.store.data.controlnet_input_image
|
||||
)
|
||||
// console.log(
|
||||
// 'session_ts.store.data.controlnet_input_image: ',
|
||||
// session_ts.store.data.controlnet_input_image
|
||||
// )
|
||||
|
||||
response_json = await this.requestControlNetTxt2Img(settings)
|
||||
} else {
|
||||
|
|
@ -408,7 +408,7 @@ export class Img2ImgMode extends Mode {
|
|||
let response_json
|
||||
let output_images
|
||||
try {
|
||||
//checks on index 0 as if not enabled ingores the rest
|
||||
//checks on index 0 as if not enabled ignores the rest
|
||||
const b_enable_control_net = control_net.isControlNetModeEnable()
|
||||
|
||||
if (b_enable_control_net) {
|
||||
|
|
|
|||
|
|
@ -71,10 +71,13 @@ class Notification {
|
|||
}
|
||||
return false
|
||||
}
|
||||
static async inactiveSelectionArea(is_active_session) {
|
||||
static async inactiveSelectionArea(
|
||||
is_active_session,
|
||||
button_label = 'Continue Session'
|
||||
) {
|
||||
let buttons = ['Cancel', 'Rectangular Marquee']
|
||||
if (is_active_session) {
|
||||
buttons.push('Continue Session')
|
||||
buttons.push(button_label)
|
||||
}
|
||||
const r1 = await dialog_box.prompt(
|
||||
'Please Select a Rectangular Area',
|
||||
|
|
@ -89,7 +92,7 @@ class Notification {
|
|||
console.log('Rectangular Marquee')
|
||||
psapi.selectMarqueeRectangularToolExe()
|
||||
return false // should this be false?! what does true and false means in this context?! Yes: it should be false since boolean value represent wither we have an active selection area or not
|
||||
} else if (r1 === 'Continue Session') {
|
||||
} else if (r1 === button_label) {
|
||||
await activateSessionSelectionArea()
|
||||
return true
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue