Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DashItem Offset and Length variables are not consistent when editing them #1265

Closed
FirasH opened this issue Mar 21, 2020 · 7 comments · Fixed by #1270
Closed

DashItem Offset and Length variables are not consistent when editing them #1265

FirasH opened this issue Mar 21, 2020 · 7 comments · Fixed by #1270

Comments

@FirasH
Copy link
Member

FirasH commented Mar 21, 2020

Issue description:

  1. Create a new document
  2. Create an Advanced Outline: Toolbox > Spline Tool > enable "Advanced Layer"
  3. Select it and in the Parameters Window open the sub-menu Dash Item List > Dash Item 001

Here you can see the list of parameters. If you select either Offset or Length the value is displayed without unit (by default 0.100000):
view

but if you try to edit it, it will display 6.00000px:
edit

I assume those two values should be consistent, because as it is now, you have to "guess" the value which corresponds to px and viceversa.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@FirasH
Copy link
Member Author

FirasH commented Mar 21, 2020

0,100000 should be a relative size to length of the spline.

@FirasH
Copy link
Member Author

FirasH commented Mar 23, 2020

I also found this code:

ret.push_back(ParamDesc("amount")
.set_local_name(_("Amount"))
.set_is_distance(false)
.set_description(_("The distortion intensity (negative values inverts effect)"))
);

where .set_is_distance(false) is used.

But if I'm not wrong the variable bool is_distance_ is set to false by default:

is_distance_ (false),

thus calling the method:

ParamDesc& set_is_distance(bool x=true) { is_distance_=x; return *this;}

with false is redundant. Right?

@FirasH
Copy link
Member Author

FirasH commented Mar 23, 2020

The same issue is also happening for Dash Items Offset. It should be a relative value to the length of the advanced outline.

@FirasH
Copy link
Member Author

FirasH commented Mar 28, 2020

Even for exported values something similar happens:

  1. Create a new document
  2. Select the Spline Tool and create an Outline Layer
  3. Go to the Parameter Panel and right-click on Outline Width > Export Value (default value 1.000000pt)

In the Library Panel the value is now stored and not consistent (0.016667).
In this case I'm not sure if this behavior can be considered an issue...

@rodolforg
Copy link
Contributor

thus calling the method:

ParamDesc& set_is_distance(bool x=true) { is_distance_=x; return *this;}

with false is redundant. Right?

Yes, it is.

@rodolforg
Copy link
Contributor

rodolforg commented Mar 29, 2020

Even for exported values something similar happens:

1. Create a new document

2. Select the Spline Tool and create an Outline Layer

3. Go to the `Parameter Panel` and right-click on `Outline Width > Export Value` (default value 1.000000pt)

In the Library Panel the value is now stored and not consistent (0.016667).
In this case I'm not sure if this behavior can be considered an issue...

Default value is 1.0px. It is equals to (strange internal unit) 0.016667.
It is not a bug, but yes, it is annoying :P

@FirasH
Copy link
Member Author

FirasH commented Apr 1, 2020

Default value is 1.0px. It is equals to (strange internal unit) 0.016667.
It is not a bug, but yes, it is annoying :P

Yes, but how can we make it consistent from a logical point of view?

I think there are 2 main points to deal with:

  1. If I export a value, and I want to use it for both a unit value (e.g. 1.000000px) and for a relative value (e.g. 0.016667).
  2. Making consistent the "preview" and the "edited" value should be the quite simple (set_is_distance() does that).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants