<br>
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div bgcolor="#ffffff" text="#000000">
Yes I can try to fix it but I think I first need to get a better
understanding of how all this flake stuff works.<br></div></blockquote><div><br>Well, from what i remember about flake:<br>KoCanvasBase is a base object for KisCanvasBase, and this is an interface that connects the canvas with canvas controller. KoCanvasControllerWidget is responsible for positioning the KoCanvasBase object onto a particular widget. In Krita the the role of a destination widget is performed by KisCanvasWidgetBase. <br>
We derived our own KisCanvasController from KoCanvasControllerWidget class to override some small methods, but it is not much interesting for zooming, especially after you removed scrollToCenterPoint() method ;) .<br><br>
We have KisZoomManager class as well. It is created in KisView. As far as i remember, its purpose is to retransmit signals and update ruler widgets.<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">
I wanted to make the zooming with the zoom actions (zooming with +
& - keys) work like zooming<br>
with the mose wheel (relative to the mouse position).</div></blockquote><div><br>I looked at the Gimp. It zooms around the mouse, when it is inside window rect, and zooms around the center otherwise.<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">But it seems
that the KoCanvasControllerWidget handles<br>
this internally somehow, so i wonder if I can simply switch this
behavior on somehow for zooming with actions?<br></div></blockquote><div><br>Do you mean, you want to override KAction? I'm afraid this may have some non-positive consequences. We are quite dependent on flake, so we shouldn't completely ignore it =)<br>
<br>Actually, there is KoCanvasControllerWidget::wheelEvent() method (written by Sven, iirc) doing exactly what you need. You may try to incorporate it somehow. Maybe, using KisCanvasController.<br><br>The processing of the zoom action is done KoZoomAction class. It is created in the constructor of KoZoomController.<br>
</div></div><br><br clear="all"><br>-- <br>Dmitry Kazakov<br>