Bug 181964

Summary: Image Editor's "fit-to-window" is broken when invoking a filter
Product: [Applications] digikam Reporter: Andi Clemens <andi.clemens>
Component: ImageEditor-PluginsAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles
Priority: NOR    
Version: 0.10.0   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In: 0.10.0
Sentry Crash Report:

Description Andi Clemens 2009-01-26 11:01:15 UTC
Version:           0.10.0-rc2 (using 4.1.4 (KDE 4.1.4), Arch Linux)
Compiler:          gcc
OS:                Linux (i686) release 2.6.28-ARCH

If you have selected "fit-to-window" in the editor and start a filter, the image gets zoomed in, but "fit-to-window" is still toggled. If you press "fit-to-window" button now it becomes deselected, but the image will be fit to screen now.

Also when "fit-to-window" is toggled and you zoom in / out, the button will still be toggled, normally it should be deselected now.

I tried to find the relevant code, but I have not found it right now. It looks like the tool is not reading the zoom settings of the editor window.

Andi
Comment 1 caulier.gilles 2009-01-26 11:25:10 UTC
Note: there are 2 cases: editor tool is use image preview widget with zomming feature (sharp for ex.) or not (curves for ex.).

With Sharp tool:

1/ fit to window in editor, start sharp tool => fit to window action is disabled

2/ apply sharp tool => fit to window action is enabled and zoom level restored (it can be changed a little but this is duing to right sidebar splitter size changes.

With Curves tool: like there is no zooming feature here, zoom+ and zoom- actions must be disabled (this is not the case, but actions do not have effect)

All interaction betwen zoom action and tool are here :

http://lxr.kde.org/source/extragear/graphics/digikam/utilities/imageeditor/editor/editorstackview.cpp

Code to switch on/off standard action in editor is here :

http://lxr.kde.org/source/extragear/graphics/digikam/utilities/imageeditor/editor/editorwindow.cpp#973

...and is called by:

http://lxr.kde.org/source/extragear/graphics/digikam/utilities/imageeditor/editor/editortooliface.cpp#098
http://lxr.kde.org/source/extragear/graphics/digikam/utilities/imageeditor/editor/editortooliface.cpp#109

Gilles
Comment 2 Andi Clemens 2009-01-26 12:29:03 UTC
Is there a reason why we don't allow zooming in curves tool?
It can be very useful to zoom in, when I use Gimp and the curve tool in there, I zoom a lot to see that I am not loosing too many details.
Comment 3 caulier.gilles 2009-01-26 12:35:31 UTC
This is the purpose to factorize all image plugins preview widget to a commun implementation

Gilles
Comment 4 Andi Clemens 2009-01-26 12:36:19 UTC
Ok so we will do better here :-)

Andi
Comment 5 Andi Clemens 2009-01-26 13:01:07 UTC
Zoom is acting weird in general, found another issue:

1. Open a plugin that can zoom
2. Zoom out until the zoom out action is disabled
3. toggle fit-to-window
4. zoom in: zoom out action will not be enabled (sometimes it will when zooming to 400% or more)

I think we should not put too much effort in this right now, it seems to be a bigger problem and is easier to fix when switching to the new editor preview widget?

Andi
Comment 6 caulier.gilles 2009-01-26 15:35:47 UTC
SVN commit 916945 by cgilles:

digiKam from trunk : fix some issues with zoom action between canvas and editor tool preview.
For the moment, only Zoom+ and Zoom- actions are properly managed. Later, when all Editor Tool
preview widget will be factored, we will improve zoom management to include Zoom Fit and Zoom Combox.
BUG: 181964


 M  +6 -8      editorstackview.h  
 M  +11 -0     editortooliface.cpp  
 M  +14 -19    editorwindow.cpp  
 M  +1 -0      editorwindow.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=916945