Bug 315778 - "First layer from clipboard" auto selects even after explicit unselect [JJ]
Summary: "First layer from clipboard" auto selects even after explicit unselect [JJ]
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Usability (show other bugs)
Version: git master (please specify the git hash!)
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2013-02-25 22:49 UTC by vanyossi
Modified: 2013-05-17 07:15 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
First layer from clipboard" auto select problem fixed. (2.15 KB, patch)
2013-04-01 11:25 UTC, Sahil
Details
Solves the problem of changing height and width easily (5.29 KB, patch)
2013-05-05 16:57 UTC, Sahil
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vanyossi 2013-02-25 22:49:00 UTC
When I have image data on the clipboard, Krita's new document window automatically sets the size of the Custom document size equal to the clipboard image data width and height size.

When setting the flag "First layer from clipboard" to off, if automatically sets to On after selecting with the mouse either width or height, re setting width if you selected height or height if you selected width.

Reproducible: Always

Steps to Reproduce:
1. Copy any image data to clipboard. (from krita make a stroke, select the are with the painted stroke and hit Crtl+C. from gimp, open new image, press Ctrl + C to copy image)
2. In krita go to File > New
3. On the new document dialog select "Custom Document"
4. The flag "First layer from clipboard" should be On. Set it to Off
5. Set a new width using the mouse to select the string numbers (either by double clicking or click and drag)
6. Set a new height using the mouse to select the string numbers (either by double clicking or click and drag)
Actual Results:  
The flag "First layer from clipboard" will be set to On auto magically
The Width will be set to whatever width the image date from the clipboard is

Expected Results:  
The flag "First layer from clipboard" should be kept Off
The width should have the value entered by the user.

Workaround:
After setting the flag to Off
Set cursor at the width value without selecting text using the mouse.
Erase an d input a new value using only keyboard input.
Press TAB twice to position cursor at Height.
Set new value.

Workaround 2:
If lazy, just copy anything else, other than an image, to your clipboard. (text, file, etc)
Comment 1 Halla Rempt 2013-03-19 16:14:26 UTC
Thanks for your report. We can confirm it. It should be an easy fix, so I'll mark it as a Junior Job for now.
Comment 2 Halla Rempt 2013-03-19 16:15:09 UTC
Also, raising priority, since it's something that impacts the first impression of Krita.
Comment 3 Sahil 2013-04-01 11:25:08 UTC
Created attachment 78540 [details]
First layer from clipboard" auto select problem fixed.
Comment 4 Halla Rempt 2013-04-01 11:28:44 UTC
Looks good! Thanks -- I'll push the patch for you.
Comment 5 Myriam Schweingruber 2013-04-28 03:32:04 UTC
(In reply to comment #4)
> Looks good! Thanks -- I'll push the patch for you.

Was this pushed? I see no commit message about that.
Comment 6 Halla Rempt 2013-04-28 08:14:02 UTC
Good point, I'll check with Sahil. He's got his own developer id now, he's keeping me real busy with his patches :-)
Comment 7 valerievk 2013-04-28 12:16:47 UTC
It's fixed for me, just so you'd know. :D Thanks!
Comment 8 Halla Rempt 2013-04-28 19:50:54 UTC
Yeah, I pushed that. Forget my own head next.
Comment 9 Dmitry Kazakov 2013-05-05 09:37:42 UTC
The behavior of the "First layer from clipboard" option is still quite weird:

i) When changing the size of the image manually, typing is veeery slow: it looks like the clip is recreated of every valueChanged() signal or something. Even when the checkbox is off, but the clipboard contains an image.

ii) Switching off/on the checkbox sometimes resets the values of the size textboxes, even when you typed them manually before. Sometimes it happens even more weirdly: 1) type width; 2) type height; 3) after accepting height, the width is somehow reset to the clip's width automatically.
Comment 10 Dmitry Kazakov 2013-05-05 09:39:46 UTC
The second weirdness happens, when you do the following:

1) Type Width
2) Select entire Height field with mouse
3) Start typing Height without explicit deletion of the current contents

In the result the Width is reset back to the clip's width.
Comment 11 Sahil 2013-05-05 16:57:32 UTC
Created attachment 79719 [details]
Solves the problem of changing height and width easily

The patch also does a part of the work of Bug: 187300- Better visibility of the new image..
Comment 12 Halla Rempt 2013-05-06 12:57:26 UTC
Git commit 0545a852342b581da0d9f5f28905edaec0f19372 by Boudewijn Rempt.
Committed on 06/05/2013 at 14:19.
Pushed by rempt into branch 'master'.

Fix issues with width/height when creatign image from clipboard

Patch by Sahil Nagpal

M  +16   -10   krita/ui/forms/wdgnewimage.ui
M  +20   -10   krita/ui/widgets/kis_custom_image_widget.cc
M  +1    -0    krita/ui/widgets/kis_custom_image_widget.h

http://commits.kde.org/calligra/0545a852342b581da0d9f5f28905edaec0f19372
Comment 13 Dmitry Kazakov 2013-05-08 18:18:22 UTC
Git commit f62ba74f786bb72392fbba5822c10decc0e796f4 by Dmitry Kazakov, on behalf of Boudewijn Rempt.
Committed on 06/05/2013 at 14:19.
Pushed by dkazakov into branch 'calligra/2.7'.

Fix issues with width/height when creatign image from clipboard

Patch by Sahil Nagpal

M  +16   -10   krita/ui/forms/wdgnewimage.ui
M  +20   -10   krita/ui/widgets/kis_custom_image_widget.cc
M  +1    -0    krita/ui/widgets/kis_custom_image_widget.h

http://commits.kde.org/calligra/f62ba74f786bb72392fbba5822c10decc0e796f4
Comment 14 Siddharth 2013-05-17 07:15:34 UTC
Git commit daa19d8f9843ee7451638abc13d54acdf693ace9 by Siddharth Sharma, on behalf of Boudewijn Rempt.
Committed on 06/05/2013 at 14:19.
Pushed by siddharthsharma into branch 'krita-psd-plugin-siddharth'.

Fix issues with width/height when creatign image from clipboard

Patch by Sahil Nagpal

M  +16   -10   krita/ui/forms/wdgnewimage.ui
M  +20   -10   krita/ui/widgets/kis_custom_image_widget.cc
M  +1    -0    krita/ui/widgets/kis_custom_image_widget.h

http://commits.kde.org/calligra/daa19d8f9843ee7451638abc13d54acdf693ace9