ruler shift on iconized dialogs

Post questions on how to use or achieve an effect in Inkscape.
User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

ruler shift on iconized dialogs

Postby brynn » Sun Sep 02, 2012 7:14 am

Hi Friends,
I'm posting in Help subforum until I'm certain this is a software issue. I'm not sure if this is already known, but I don't find anything at Launchpad about it. If it turns out to be a bug, this can be moved to Software subforum. If there's a known fix, please let me know :D

Working in a document with default units set to px, I had made some paths with nodes placed precisely. I was wondering if I might want to use different units, so I changed my default units to cm. But before I changed the grid units, I decided it wasn't going to help, so I changed default units back to px. Now the ruler doesn't match the nodes' original placement. I made screenshots. My snipping tool, for some reason doesn't capture the mouse pointer, and neither does Prnt Scrn key. But you can see the tiny black arrow on the ruler, which shows the pointer position.

This is with units set to px. All screenshots are at 100% zoom.

Image

Change units to cm, decide not to use cm, and change back to px. As long as Document Properties dialog is open, the ruler stays aligned with the original image. Shown here:

Image

But as soon as Doc Prop dialog is closed, ruler becomes misaligned from original drawing, by what appears to be approx -10 to 15 px:

Image

This is on Window 7, 64-bit and Inkscape 0.48.1. I've never noticed this before, but I don't use a grid, or non-px units very often. Note that I have not yet compared this misalignment to the X and Y positions (of the cursor/pointer) shown in the bottom, right corner of window. Also, note that this is all about the hoizontal, or X ruler. I haven't checked for the vertical Y ruler yet.

I don't know of a way to show this next part, except with a video, and I haven't learned how to make a video yet. The tiny black arrow, with the document in the same condition as the 3rd screenshot, changes it's horizontal position, when the mouse pointer is moved from the canvas to the ruler and back. So imagine the mouse pointer directly above the selected node, on the 300.00 px vertical line, and at the intersection of the topmost blue gridline (or anywhere along the 300.00 px gridline). As long as the mouse pointer is over the canvas, the black ruler arrow lies at 300.00 on the ruler. Of course that's what you would expect, except the 300.00 on the ruler is no longer aligned with the node placed precisely at 300.00 px. As soon as you move the mouse pointer from the top gridline (at 300 px) to the ruler itself, 2 things happen. One - the mouse pointer changes from Node pointer to Selection tool pointer (which I think is expected) (or maybe technically it changes to regular Windows arrow (which I use an enlarged version, that perhaps is the same size as the Selection tool pointer)). But more importantly, 2 - the tiny black ruler arrow jumps from 300 on the ruler to the real position of the pointer (which appears to be +10 to 15 px difference). Actually I just thought of a way to make still screenshots to show what I mean, if you need a visual.

The only fix I've found is to close the doc and re-open, and then avoid changing units. Or if I change units, leave Doc Prop open, which is not really feasible for the long run. Maybe I can't find a bug report, because this has been already fixed? Or more likely, I didn't use the right search terms :roll:

Thanks for your help :D
Last edited by brynn on Sun Sep 09, 2012 12:23 pm, edited 1 time in total.
Reason: edit title

generatemutate
Posts: 39
Joined: Thu Aug 23, 2012 5:48 am

Re: unit change, ruler descrepancy

Postby generatemutate » Sun Sep 09, 2012 4:15 am

I haven't been able to reproduce the error on the Linux version.

If you close and re-open the document, after changing the default units, the node goes back to being aligned with the 300px ruler marker?

If so this suggests that the error is produced somewhere in memory and isn't stored in the document file.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: unit change, ruler descrepancy

Postby brynn » Sun Sep 09, 2012 11:41 am

I'm not sure. Let me set up a new file to test and I'll post again. Thanks :D

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: unit change, ruler descrepancy

Postby brynn » Sun Sep 09, 2012 11:54 am

Ah-HA!
Ok, where I said
But as soon as Doc Prop dialog is closed, ruler becomes misaligned from original drawing, by what appears to be approx -10 to 15 px:

That's not entirely true. If I actually close Doc Prop (like with the red X button in top right corner) the ruler does stay aligned. But when I posted the original message, I wasn't technically closing it, but "iconizing" it. I was clicking the tiny triangle, to keep it closed in the docking area, so I could reopen it quickly. Until now, I thought closing and iconizing was about the same thing. But apparently not, since this problem only occurs when using iconize!

I'm not sure if it matters anymore, but I'll try closing and reopening, and brb.

Edit
Ah-HA! When I click Save, the ruler jumps back into alignment!

Edit #2
Ah-HA! And wow! I don't even have to change units, or change anything in Doc Prop. All I have to do is open it, and iconize it, and the ruler jumps out of alignment! I can't believe this hasn't been noticed before. Let me check Launchpad, and I'll post again :D

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: unit change, ruler descrepancy

Postby brynn » Sun Sep 09, 2012 12:06 pm

I found this bug, reported by our own ~suv, but I'm not sure it's the same thing. Maybe what I've found is a different way of reproducing it. But I'm not sure. It says that opening a docked dialog causes the ruler to shift. But I don't see that. I only see when Doc Prop is iconized. https://bugs.launchpad.net/inkscape/+bug/950552

Edit
By the way, closing the document and re-opening resolves the ruler shift (i.e. brings it back into alignment with same node).

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: unit change, ruler descrepancy

Postby brynn » Sun Sep 09, 2012 12:20 pm

Omg, I'm in the Twilight Zone! I thought I would check other dialogs, and now I do see the bug that ~suv reported. I can't believe I've never noticed it before -- probably because I zoom so much (and apparently zooming does force the ruler to unshift).

Anyway, when I open a docked dialog, the ruler shifts a lot more -- almost 100 px. But when I iconize it, it doesn't shift all the way back.

Probably I don't experience the shift when I open Doc Prop because I don't have it docked. But it can be iconized. So perhaps there are 2 problems here?

~suv, please let me know if I should add a comment to your bug, or if you would rather do it yourself. This does seems like new info. Also, this confirms your report in Windows 7, 64-bit and Inkscape 0.48.1. (edit) Or maybe this has been fixed by now? (/edit)

I'm thinking of editing my title, since I now believe that the ruler shift is not related to a unit change....yes, I think I'll edit the title.

generatemutate
Posts: 39
Joined: Thu Aug 23, 2012 5:48 am

Re: ruler shift on iconized dialogs

Postby generatemutate » Sun Sep 09, 2012 5:08 pm

I can confirm this bug on Linux with inkscape 0.48.1 (32-bit).

When iconfying floating dialogue box ruler scale is shifted. Checked with 'document properties'.

When opening 'panel locked' dialogue box ruler scale is shifted. Checked with 'colour and style' and 'alignment'.

----

The ruler corrects itself when main window is scrolled. However, in this case un-iconfying floating dialogue or closing 'panel locked' dialogue shifts the ruler.

Again, the ruler corrects itself when main window is scrolled.

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: unit change, ruler descrepancy

Postby ~suv » Sun Sep 09, 2012 9:07 pm

brynn wrote:~suv, please let me know if I should add a comment to your bug, or if you would rather do it yourself. This does seems like new info.
Not really new info: among the triggers of the minor glitch is when the dock - holding docked and/or iconified dialogs - changes its width. Obviously, iconifying a detached (aka floating) dialog may add a new column in the dock, holding the button of the iconified dialog. You might also have noticed that if there are already iconified dialogs in the dock (e.g. Inkscape Preferences), the ruler won't be additionally offset when iconifying a second dialog (e.g. Document Properties) - the width of the docked in this case stays unchanged because the column holding the buttons of the iconfied dialogs already exists. You might also have noticed that if you open the iconified dialog again, and it was the only iconfied dialog, the ruler is offset again (in the opposite direction), because the width of the dock has been reduced (the column holding buttons of iconified dialogs is gone).

In more generic terms, certain GUI elements whose visibility or size may cause the size of the displayed canvas area to be expanded or reduced at either side (toolbox, dock, scrollbars, palette, status bar) cause the ruler(s) to wrongly update (they temporarily are out-of-sync with the visible part of the canvas area).

brynn wrote:Also, this confirms your report in Windows 7, 64-bit and Inkscape 0.48.1. (edit) Or maybe this has been fixed by now? (/edit)
The report is already confirmed (also for Windows), and the bug status set to 'Triaged' (i.e. the report provides sufficient information for any developer interested to fix it). And no, as can be read in the details and comments of the report, is is not fixed, and Inkscape 0.48.1 is the first version of Inkscape which shows this minor regression in the GUI (Note: it has not lasting effect which could break usage of any commands - this is just a temporary visual misalignment of the ruler).

I will update the report and list other items which may trigger it - e.g. showing/hiding the palette causes the vertical ruler to be offset until next time the canvas is refreshed (scrolled, zoomed, etc), or showing/hiding the toolbox (to the left).

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: ruler shift on iconized dialogs

Postby brynn » Mon Sep 10, 2012 3:49 am

Thank you very much ~suv :D


Return to “Help with using Inkscape”