[Digikam-devel] Re: extragear/graphics/digikam/libs/models

Andi Clemens andi.clemens at gmx.net
Wed Nov 17 16:09:11 GMT 2010


Something is wrong here, this fix isn't a good solution.
When I switch into PreviewMode, the size of the thumbnail is set to the 
zoomLevel of the preview image.
I guess the fix must be a little bit more complex, any idea what's wrong 
exactly?

Andi

On Wednesday 17 November 2010 16:53:24 Andi Clemens wrote:
> SVN commit 1198151 by aclemens:
> 
> set the lastGlobalThumbSize, otherwise it is always zero and therefore a
> wrong label is set for the dtooltiptracker as well as the slider on album
> switch.
> 
> There is still some weird issue:
> Everytime you set an thumbsize (e.g. 80) and switch to another album, the
> size is always
> size +=2
> even if you use the maxsize of 256 (it becomes 258).
> 
> This only happens when the slider has been moved (a new thumbsize has been
> defined), if you switch the album a second time, the size+=2 version is
> used.
> 
>  M  +5 -0      imagethumbnailmodel.cpp
> 
> 
> --- trunk/extragear/graphics/digikam/libs/models/imagethumbnailmodel.cpp
> #1198150:1198151 @@ -227,10 +227,15 @@
>      if (role == ThumbnailRole && d->thread)
>      {
>          if (value.isNull())
> +        {
>              d->thumbSize = d->lastGlobalThumbSize;
> +        }
>          else
> +        {
>              d->thumbSize = value.toInt();
> +            d->lastGlobalThumbSize = d->thumbSize;
>      }
> +    }
>      return ImageModel::setData(index, value, role);
>  }



More information about the Digikam-devel mailing list