Problem when deleting an image while annotating in KPA 5.12

Constantin Orăsan c.orasan at gmail.com
Fri Jan 5 23:44:09 GMT 2024


Hi Johannes,

Thank you for the hint. I had a look at the code. It seems to be that the
problem originates from the fact that in
AnnotationDialog::Dialog::slotDiscardFiles()
m_preview->configure(&m_editList, (m_setup == InputSingleImageConfigMode));
is called. If I understand correctly the variable m_current tracks the
current image.
In ImagePreviewWidget::configure m_current is initialized to 0 (line 154),
so it seems that the position from slotDiscardFiles is lost.

Unfortunately, I don't know the code to propose a quick solution. If I did
this in python, I would add a parameter with the default value 0 to
ImagePreviewWidget::configure which allows me to pass the value of
m_current from slotDiscardFiles.

If you want I can submit a bug, but I would need to create yet another
account and repeat what I said here. I hope the discussion here helps.

Thank you,

Constantin

On Fri, 5 Jan 2024 at 20:52, Johannes Zarl-Zierl <johannes at zarl-zierl.at>
wrote:

> Hi Constantin,
>
> Am Donnerstag, 4. Jänner 2024, 17:34:35 CET schrieb Constantin Orăsan:
> > Hello and Happy New Year!
> >
> > I have just upgraded KPA to the latest version. Unfortunately, the
> > behaviour of the annotation window changed when I delete an image (I
> > suppose it is a bug not a feature). Whenever I delete an image, the
> > annotation dialog jumps back to the first image from the selection.
> >
> > The steps to replicate this:
> > 1. select a bunch of images
> > 2. select "annotate individual images"
> > 3. annotate images or just navigate through images
> > 4. delete an image from the dialog
> > At this stage I would expect that the dialog moves to the next image (as
> it
> > used to do in the past). Instead it jumps back to the first image in the
> > selection.
> >
> > I compiled KPA from the source on Ubuntu 23.10.
> >
> > My C skills are very very rusty, but if someone can point me to the right
> > file(s) to look at, I can try to see if I can figure out what's going on.
>
> The code you're looking for is probably in the method
> AnnotationDialog::Dialog::slotDiscardFiles() in
> AnnotationDialog/Dialog.cpp.
>
> We're open for merge requests via invent.kde.org, and bug discussion on
> bugs.kde.org has also room for patches (plus: if you decide to not submit
> a
> patch work can continue there if you have already submitted a bug report).
>
> Cheers,
>   Johannes
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kphotoalbum/attachments/20240105/eda51694/attachment.htm>


More information about the KPhotoAlbum mailing list