[PATCH] krita bug when d&d from firefox

Sven Langkamp sven.langkamp at gmail.com
Sun Jan 10 05:13:32 CET 2010


On Sat, Jan 9, 2010 at 11:23 PM, PEGON Marc <pe.marc at free.fr> wrote:

> This small patch for krita attached corrects a bug when drag&drop from
> firefox : nothing happened after selecting "Insert as New Layer".
> The problem was a bad use of KUrl : the KUrl constructor should be used
> instead of url.setPath(path) to set an url, otherwise you'll get
> problems with non-local urls.
> Also changed some lines so that undo/redo works after having d&d an
> image from firefox.
>
> mpeg
>
>
Congrats to your first Krita patch.
I have some remarks:

Instead of KUrl url=KUrl(filename); you can just write KUrl url(filename);

You shouldn't do this:
device->convertFromQImage(importedImage->projection()->convertToQImage(0),
"");
By converting to and from QImage the colorspace information is lost. Instead
better use the paint device directly.

For the KisNodeCommandsAdapter the inserted if clause isn't needed as it
gets the correct insertion position a few lines earlier and stores it in
parent.
The addNode call is the same as before just with the adapter.

You don't have to call m_d->view->canvas()->update(); because setDirty will
update the canvas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kimageshop/attachments/20100110/99d66010/attachment.htm 


More information about the kimageshop mailing list