krita-ai-diffusion icon indicating copy to clipboard operation
krita-ai-diffusion copied to clipboard

[Feature Request] Keyboard Shortcuts - make 'Discard Image' less "wonky"

Open TFWol opened this issue 7 months ago • 2 comments

It'd be much more convenient to be able to press a shortcut to easily remove images as you use the arrow keys to preview them.

TFWol avatar May 17 '25 12:05 TFWol

Am I overlooking an option somewhere?

TFWol avatar May 21 '25 11:05 TFWol

I just saw in the code that the ability is there, but it acts a bit odd. If you press delete it doesn't always delete until you press it again. After deletion, it also won't select the next image. So pressing "Delete, Delete, left" will skip an image.

TFWol avatar May 21 '25 11:05 TFWol

Fixed in v1.35.0

Cursor should also move to the next image now (but doesn't select it), so pressing left/right has the expected behavior.

Acly avatar May 24 '25 18:05 Acly

Awesome. I wanted the current item to be selected by default so I could quickly decide if I want to delete (plus it feels more intuitive); I generate hundreds of images, so having to press Space and then Delete if I don't like the image is tedious. I made a tweak to the _discard_image to do so. Just posting it in case someone else wanted the same functionality.

From self.setCurrentRow(next_item, QItemSelectionModel.SelectionFlag.Current

To self.setCurrentRow(next_item, QItemSelectionModel.SelectionFlag.Current | QItemSelectionModel.SelectionFlag.Select)

Had to use AI to sort of understand. I would've made a setting in the plug-in, but I know nothing on how Krita and plug-ins interact (don't have the time/energy to learn those specifics)

TFWol avatar May 29 '25 06:05 TFWol