Skip to content

Port manual Save Image action to current image controls#1286

Open
Reaper176 wants to merge 1 commit intomcmonkeyprojects:masterfrom
Reaper176:feature/manual-save-image
Open

Port manual Save Image action to current image controls#1286
Reaper176 wants to merge 1 commit intomcmonkeyprojects:masterfrom
Reaper176:feature/manual-save-image

Conversation

@Reaper176
Copy link

@Reaper176 Reaper176 commented Feb 12, 2026

  • add save image button

buttonsChoice = defaultButtonChoices;
}
else if (buttonsChoice.toLowerCase().replaceAll(' ', '') == 'useasinit,editimage,star,reuseparameters') {
buttonsChoice = `${buttonsChoice},Save Image`;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is ... weird. Overriding user preference like this should not happen

}, (metaParsed.is_starred ? ' star-button button-starred-image' : ' star-button'), 'Toggles this image as starred - starred images get moved to a separate folder and highlighted');
}
includeButton('Reuse Parameters', copy_current_image_params, '', 'Copies the parameters used to generate this image to the current generation settings');
if (!isVideo && !isAudio) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should only apply when isDataImage is true

showError('Manual save is only supported for images.');
return;
}
if (button?.dataset.saving == 'true') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

redundant, disabled has it covered

requestData.image = imageData;
genericRequest('AddImageToHistory', requestData, res => {
releaseButton();
if (!res || res.error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this check can't fire

imageFullView.showImage(saved.image, savedMetadata, imageFullView.currentBatchId);
imageFullView.pasteState(state);
}
if (typeof imageHistoryBrowser !== 'undefined' && imageHistoryBrowser?.lightRefresh) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this if check will never be false

finish(img.src);
}
else {
toDataURL(img.src, finish);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is only applicable to data url images, so the check is not needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants