Can't switch ellipse (circle) mode to whole ellipse

Bug #459811 reported by Kjohrf
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
Krzysztof Kosinski

Bug Description

This seems new in 0.47pre4 but maybe I just did something weird.

I drew an arc, not a whole ellipse.

Now I want to draw another ellipse, a whole one. I can't without
drawing an arc first, then clicking the whole ellipse toolbar button!
I am not allowed to click that button BEFORE drawing a new ellipse.

Worse yet, the next ellipse I draw is an arc again.
I HAVE TO DO THIS FOR EVERY ELLIPSE I WANT TO DRAW.

Sorry about the all caps, but this is frustrating me. :)

Revision history for this message
su_v (suv-lp) wrote :

Can you attach you preferences file? Maybe this is related to bug #371386 “Circle or ellipse is invisible” which was caused by very small numbers for start and end of the arc. If I change one of the start or end values to similarly low values as mentioned in bug #438141 (duplicate of bug #371386) I can reproduce your issue or an odd behaviour of the arc tool similar to your description.

tags: added: shape-editing
Revision history for this message
Alvin Penner (apenner) wrote :

confirmed, this is a regression.

The icons for choosing ellipse type work properly on Oct 13, 2008 build 19989, they do not work properly on Nov 20, 2008 builld 20225.
In the broken version, a switch between the ellipse type arc-unclosed to arc-closed will be remembered and used both on the current ellipse and on new objects, but a switch from an arc object to a whole ellipse will not be remembered when drawing new objects.

Changed in inkscape:
status: New → Confirmed
Revision history for this message
Kjohrf (kjohrf) wrote :

Phew. I'm not going crazy. Thanks for confirming!

tags: added: regression
Revision history for this message
su_v (suv-lp) wrote :

Let me clarify comment #1 - not confirmed with Inkscape 0.47pre4 on OS X, unless I manually tinker with my preferences file.

Revision history for this message
Alvin Penner (apenner) wrote :

on Windows XP the behaviour is as follows:
- draw an ellipse, which in this case happens to be a whole ellipse, not an arc
- note that all three icons at the top are disabled (segment closed, arc unclosed, and whole ellipse)
- open the ellipse into a closed-segment arc by dragging the start angle, note that all three icons at the top are now enabled
- click on 'switch to arc-unclosed' and the ellipse responds appropriately and the three icons are still enabled
- draw a new ellipse and the new ellipse is a whole ellipse not an arc-unclosed as it should have been, and the three icons at the top are now disabled so that it is no longer possible to change the ellipse style using them, unless you manualy drag the handles as before.
- it might be worth mentioning that in the Oct 2008 version of Inkscape the three icons at the top would not become disabled when drawing an arc shape (either closed or open); these three icons would become disabled only when drawing a whole ellipse, which makes perfect sense because once you have drawn a whole ellipse the angular arc information has been destroyed..

Revision history for this message
su_v (suv-lp) wrote :

@Alvin - i.e. you don't see the bug in 0.47pre4?
@Kjohrf - please attach your preferences file. I think your issue needs further clarification (or I just don't get it ;-)

Revision history for this message
Alvin Penner (apenner) wrote :

sorry, the bug is still present, it was introduced in October of 2008

Revision history for this message
su_v (suv-lp) wrote :

I see these differences (on osx):
0.46: the arc setting sticks for the next ellipse created
0.47: the arc setting is only available for the currently selected ellipse, but unavailable for new ellipses which default to full circle

There obviously was a change in the behavior of the ellipse tool - be it intentional or not. But that's not the problem Khorf describes… he sees the sticky behavior of 0.46 in 0.47pre4 and can't even reset it to full circle again (AFAIU).

Revision history for this message
Kjohrf (kjohrf) wrote :

I think this is the section of my preferences.xml file that you would care about...

  <group
     id="tools"
     bounding_box="0"
     style="fill:none;stroke:black;stroke-opacity:1;stroke-width:1px;stroke-linejoin:miter;stroke-linecap:butt;">
    <group
       id="shapes"
       style="fill-rule:evenodd;"
       selcue="1"
       gradientdrag="1"
       arcstart="0"
       arcend="0">
      ...
      <eventcontext
         id="arc"
         style="fill:red;"
         end="0.068538919"
         start="0.041123352"
         usecurrent="1"
         open="0" />
    </group>

Revision history for this message
Kjohrf (kjohrf) wrote :

I tried making an arc (which is a very small angle), then changing the angle to 0 to 90. Then changing that to a whole ellipse. I think there is a bug related to small arcs (not that I ever wanted such a small arc for anything I've done!). Anyway, this did not help. I am on WinXP.

I never had this issue with 0.46, or the previous 0.47 development build.

PS Now I don't see the "whole ellipse" icon on the tool bar correctly. It's a "new document" box with a red X in it. It does make the arc whole when I click on it, but it still doesn't stick.

Revision history for this message
su_v (suv-lp) wrote :

To me it looks like there are currently two conflicting locations for the arc start/end values in the preferences
a) group id="shapes"
b) eventcontext id="arc"
(0.46 had them only within the "arc" event context). Any start/end values (other then '0') that are stored inside the "arc" event context cause this wrong behavior and can't be reset within the GUI.

Looking at the SVN commits between the two version Alvin mentions, there was that last big commit of the preferences refactoring in revision 20019 ("Finalize preferences refactoring") that *maybe* could have broken the old 'sticky controls' feature and *maybe* introduced this 'sticky tiny arc' bug of the ellipse tool controls.

Proposing to mark this report as duplicate of bug #371386.

Changed in inkscape:
importance: Undecided → Medium
Revision history for this message
Kjohrf (kjohrf) wrote :

In the meantime, is there a way I can edit my preferences file as a workaround when this happens?

Revision history for this message
su_v (suv-lp) wrote :

oops - sorry, I thought you'd figured that out ;-)

To reset the ellipse tool: For me it works to
1) make sure you quit Inkscape
2) set the second set of start/end values (inside the <eventcontext id="arc" …>) to 0, save
3) and restart Inkscape.

Do you agree about the duplicate? (I have already changed the status of older report from 'Invalid' to 'Confirmed' and raised the importance to 'Medium')

Revision history for this message
Kjohrf (kjohrf) wrote :

That works great now, though the toolbar "whole ellipse" icon is still missing for some reason (described in a comment above). But it works. Thanks.

I don't know aobut duplicate or not. Unless it's obvious that the symptoms are the same, my preference is to keep separate bug reports, and then if one fix fixes both, congratulations. :)

Revision history for this message
su_v (suv-lp) wrote :

> I don't see the "whole ellipse" icon on the tool bar correctly
Does it make a difference if you start Inkscape with default preferences (rename your 'preferences.xml' to preferences-Kjohrf.xml' or whatever before starting Inkscape, thus you can easily restore your settings afterwards)?

> my preference is to keep separate bug reports, and then if one fix
> fixes both, congratulations.
It is cumbersome to scour the bug tracker every time a fix is committed to mark all related bugs fixed... and reports thus tend to stay behind with status 'Confirmed' even if it's been fixed some time ago. Linking as duplicate doesn't lower the importance of a report, it avoids to have parallel discussions about the same issue and helps to track all related reports without manually touching every single one.

Revision history for this message
su_v (suv-lp) wrote :

> Unless it's obvious that the symptoms are the same
Digging further into this:

A) the bug already exists in Inkscape 0.46 (and 0.46+devel < r22019?):

start inkscape, set arc controls to
| ui controls bar start/end values: 45 / 135
quit inkscape
| preferences.xml start/end values: 0.78539816 / 2.3561945
restart inkscape, select ellipse tool
| ui controls bar start/end values: 0.785 / 2.356
quit inkscape
| preferences.xml start/end values: 0.013707784 / 0.041123352

i.e. start and end values (x) are written as (2pi/x) to the prefs but read as "x" in degree. Once the values have been changed from 0, they get smaller every time Inkscape 0.46 (0.46+devel < r22019?) is started, until they reach so small values that the resulting arc/segment is no longer visible.

B) the bug is not fixed in Inkscape 0.47(pre) but hidden:

start inkscape, set arc controls to
| ui controls bar start/end values: 45 / 135
quit inkscape
| preferences.xml arcstart/arcend: 0.78539815999999985 / 2.3561945
| preferences.xml start/end values: 0 / 0
restart inkscape, select ellipse tool
| ui controls bar start/end values: 0 / 0
quit inkscape
| preferences.xml arcstart/arcend: 0 / 0
| preferences.xml start/end values: 0 / 0

The controls bar values for start and end are written as (2pi/x) values into the group "shapes" (instead of the eventcontext "arc"). However they are still read from within the eventcontext "arc" when activating the arc tool.

Some (?) routine however still writes start/end values to the eventcontext "arc" and then these values are read as "x" in degrees (still wrong!) and used as default for start/end of new arcs/ellipses. There is no apparent way in the GUI to change these start/end default.

tested with these steps:
quit inkscape, mnually edit preferences.xml
| preferences.xml arcstart/arcend: 0.5 / 1.0
| preferences.xml start/end values: 0.5 / 1.0
restart inkscape, select ellipse tool
| ui controls bar start/end values: 0.5 / 1.0
and draw an ellipse - you only get an arc:
| ui controls bar start/end values: 28.648 / 57.296
quit inkscape
| preferences.xml arcstart/arcend: 0.5 / 1.0
| preferences.xml start/end values: 0.5 / 1.0
restart inkscape, select ellipse tool
| ui controls bar start/end values: 0.5 / 1.0
and draw an ellipse - you only get an arc:
| ui controls bar start/end values: 28.648 / 57.296
change the arc to a whole ellipse with the controls bar button
| ui controls bar start/end values: 0 / 0
quit inkscape
| preferences.xml arcstart/arcend: 0 / 0
| preferences.xml start/end values: 0.5 / 1.0
restart inkscape, select ellipse tool
| ui controls bar start/end values: 0.5 / 1.0
and draw an ellipse - you only get an arc:
| ui controls bar start/end values: 28.648 / 57.296
quit inkscape
| preferences.xml arcstart/arcend: 0.5 / 1.0
| preferences.xml start/end values: 0.5 / 1.0

Revision history for this message
su_v (suv-lp) wrote :

Krzysztof - do you mind if I assign this report to you with the hope you could take a look at this?

Changed in inkscape:
assignee: nobody → Krzysztof Kosiński (tweenk)
status: Confirmed → Triaged
Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

There is a missing slash in line 4932 of toolbox.cpp, it might be the cause of this bug. Investigating further.

BTW, this bug highlights why being able to set any pref value even if it doesn't exist is wrong, so my refactoring work in that area is not done yet...

Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

Yes, the typo was the reason, it works correctly now. Attaching here and sending to mailing list as well.

Revision history for this message
su_v (suv-lp) wrote :

@Krzysztof - thank you for your prompt answer and fix!

I can't test the patch right now (will do later tonight) - one questions though: did you have a look at the conversion bug that existed in 0.46 and created those very very small values in the preferences that make the arc invisible?

Revision history for this message
su_v (suv-lp) wrote :

Patch tested and partial fix confirmed with Inkscape 0.6+devel 22547+patch on OS X 10.5.8

fixed:

B) read/write to different locations in the prefs file
The values for start & end of the arc/segment option are now correctly read and written to the same location inside the eventcontext id="arc".

still broken:

A) no units conversion on read
The values stored in the preferences file are *not* converted to degrees when being read and filled into the entry fields of the ellipse controls bar. On write however the values taken from the controls bar entry fields are *always* converted from degree to the internally used value (radians?).
This results in smaller and smaller values stored in the preferences with every launch/quit cycle of inkscape. The ellipse controls bar misleadingly shows '0.000' after some cycles but the created ellipse isn't visible because it is a tiny arc (or segment) only. Once the user draws an ellipse and resets the values to '0' (by using the 'whole circle' button on the controls bar) it starts all over again.

(see also bug #371386 and bug #438141)

Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

This fixes both problems. Pref values for /tools/shapes/arc/* can be left unchanged from previous versions now.

Changed in inkscape:
status: Triaged → In Progress
Revision history for this message
su_v (suv-lp) wrote :

Patch tested and fix confirmed with Inkscape 0.46+devel r22552 custom, built Nov 3 2009

Thanks a lot, Krzysztof! Finally the ellipse tool and its tool control options behave as intended ;-)

Revision history for this message
Kjohrf (kjohrf) wrote :

@suv - You wrote: "Does it make a difference if you start Inkscape with default preferences (rename your 'preferences.xml' to preferences-Kjohrf.xml' or whatever before starting Inkscape, thus you can easily restore your settings afterwards)?"

I just saw that and tried it. When I don't have any object selected, and I select the Ellipse tool, all three arc/whole ellipse
toolbar icons are visible, but they are grayed out. Shouldn't they be active so I can choose before drawing an ellipse?

Revision history for this message
Kjohrf (kjohrf) wrote :

Is there any workaround to get an unfilled arc? It won't draw one for me now with 0.47pre4.

Revision history for this message
Kjohrf (kjohrf) wrote :

Never mind. I figured out what I was doing wrong. Sorry.

Revision history for this message
bbyak (buliabyak) wrote :

Thanks, patch tested and applied in 22563.

Changed in inkscape:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.