View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0017087 | Scribus | User Interface | public | 2023-12-20 15:11 | 2023-12-24 10:00 |
Reporter | nitramr | Assigned To | jghali | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Desktop PC | OS | Ubuntu | OS Version | 23.10 64-bit |
Product Version | 1.6.0.svn | ||||
Target Version | 1.6 milestone | Fixed in Version | 1.6.0.svn | ||
Summary | 0017087: Spiral Edit Dialog doesn't allow angle greater than 360° | ||||
Description | ScrSpinBox has a limitation for value changes with mouse wheel if the unit is in degree. A max value of 360 ° make sense but in this case the angle can be greater than 360 ° The attached patch file changes the max angle of 360 to the maximum value of the spinbox. | ||||
Steps To Reproduce | 1. Create a new document 2. Add a spiral on page 3. double-click on spiral item to edit the values 4. change "end angle" with mouse wheel BUG=> value changes directly to value of "start angle" Input changes with keyboard are working as expected. | ||||
Tags | No tags attached. | ||||
Patch | Yes | ||||
|
spinboxfix_2023-12-20_01.patch (511 bytes)
Index: scribus/ui/scrspinbox.cpp =================================================================== --- scribus/ui/scrspinbox.cpp (Revision 25886) +++ scribus/ui/scrspinbox.cpp (Arbeitskopie) @@ -83,10 +83,10 @@ { double angle = this->value(); angle += steps * singleStep(); - while (angle < 0.0) - angle += 360.0; - while (angle > 360) - angle -= 360.0; + while (angle < minimum()) + angle += maximum(); + while (angle > maximum()) + angle -= maximum(); setValue(angle); return; } |
|
I do not agree on the math here, I think that should be: while (angle < minimum()) angle += 360; while (angle > maximum()) angle -= 360; |
|
If the maximum is greater than 360 it will not work. In case of a spiral the maximum angle is 36000. When you reach 36001 it will adjust the angle to 35641 instead of 0. |
|
While going back from 360 to 0 makes sense for item rotations, I don't think it does for spiral angles, so I maintain what I wrote. Also with your proposal, the math in your patch is also wrong if minimum() is < 0, it should be: while (angle < minimum()) angle += maximum() - minimum(); while (angle > maximum()) angle -= maximum() - minimum(); |
|
does scribus really need a spiral tool? - on my monitor, exactly one tool does not fit in the toolbar... the barcode one. if there was no spiral tool everything would fit (ok, that's not really an argument...) - if i try to move the central node of the spiral after a couple of seconds of sensitive moving around, the spiral just disappears, no way to get it back. - if i try to move the external node, i can do 3/4 of a tour and then it moves back and forth and i can't get any further change. - if i try to change the end angle in the pop up dialog, i manage to "break" the spiral after the second value change. no way to get back to a visible spiral. - if i close the dialog and try to undo, the dialog pops up again and i don't feel like it undoes anything. in any case i don't get back to the initial correct spiral. - all this make it almost impossible to edit a spiral and one thought comes up: when did i last use a spiral in scribus? (or anywhere else?). when did i read a question about the spiral tool in the forums (or in the mailing list or in irc? never! has anybody ever filled a bug about the spiral tool?) my suggestion is to simply remove the spiral tool and if, possibly, replace it by a python script that creates a spiral with a bezier curve (that will be a nice exercise for understanding how beziers work!) |
|
We're not going to remove the spiral tool. |
|
well, if scribus has the workforce for fixing it, i'm ok with keeping it... but i think it's not a good idea to keep a tool that does not work and nobody uses. personally, i'd prefer the devs to focus on other things, rather on fixing this, that's why i'm suggesting to remove it. |
|
I completely agree with ale. |
|
We need to maintain compatibility with older docs, and imported docs/SVGs etc. The tool needs fixing, not removing. Considering it might be used less, we can deprioritise major fixes over other things. |
|
In the end I think we should just clamp the angle between minimum() and maximum() in the spiral case, so the code would be: double angleRange = maximum() - minimum(); if (angleRange == 360.0) { while (angle < minimum()) angle += 360.0; while (angle > maximum()) angle -= 360.0; } else angle = std::max(minimum(), std::min(angle, maximum())); |
Date Modified | Username | Field | Change |
---|---|---|---|
2023-12-20 15:11 | nitramr | New Issue | |
2023-12-20 15:11 | nitramr | File Added: spinboxfix_2023-12-20_01.patch | |
2023-12-20 22:25 | jghali | Note Added: 0050663 | |
2023-12-20 22:39 | nitramr | Note Added: 0050665 | |
2023-12-21 22:50 | jghali | Note Added: 0050680 | |
2023-12-22 07:22 | ale | Note Added: 0050681 | |
2023-12-22 07:26 | cbradney | Note Added: 0050682 | |
2023-12-22 09:00 | ale | Note Added: 0050683 | |
2023-12-22 11:36 | ale | Note Edited: 0050683 | |
2023-12-23 07:45 | PeterBenedek | Note Added: 0050689 | |
2023-12-23 09:43 | cbradney | Note Added: 0050690 | |
2023-12-23 22:29 | jghali | Note Added: 0050691 | |
2023-12-23 22:51 | jghali | Summary | [PATCH] Spiral Edit Dialog doesn't allow angle greater than 360° => Spiral Edit Dialog doesn't allow angle greater than 360° |
2023-12-23 22:51 | jghali | Assigned To | => jghali |
2023-12-23 22:51 | jghali | Status | new => resolved |
2023-12-23 22:51 | jghali | Resolution | open => fixed |
2023-12-23 22:51 | jghali | Fixed in Version | => 1.6.0.svn |
2023-12-24 01:29 | jghali | Note Edited: 0050691 | |
2023-12-24 10:00 | cbradney | Status | resolved => closed |