kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #11516
Re: Block rotate behavior.
On 10/25/2013 6:54 AM, mj wrote:
> On 10/14/13 19:55, jp charras wrote:
>> Le 14/10/2013 19:26, Wayne Stambaugh a écrit :
>>>> Pcbnew rotate has a potential bug relative to the Undo command: in
>>>> preferences the rotation can be adjusted to 45 or 90 degrees.
>>>> for 90 degrees, no problems.
>>>> But for 45 degrees, the undo does not work, because the undo rotate code
>>>> assumes a 90 degrees rotation (the actual rotation angle is not stored).
>>>>
>>>>
>>> How do you rotate a block 45° in Pcbnew? The only command paths I see
>>> are the block context menu rotate command and the rotate hot key both of
>>> which rotate the block 90° clockwise.
>>
>> The Preference/general menu has an option (from a contributor who never
>> fix issues created by this option) which allows user to choose between
>> 90 or 45 degrees.
>> When the 45 degrees is selected, rotation angle for footprints and
>> blocks (by hotkey or popup menu) is 45 degrees.
>> Because this option does not work for all items (for instance texts) and
>> does not work for Undo commands, I am thinking this option is a just a bug.
> It's buggy and I reported it a long time ago, here is my small list with
> rotation-based bugs:
> https://bugs.launchpad.net/kicad/+bug/1066182
> https://bugs.launchpad.net/kicad/+bug/1066183
> https://bugs.launchpad.net/kicad/+bug/1066185
>
>> It can be removed or fixed.
>> My opinion is this broken option can be removed.
> Which one do you want to remove? For my part, the 45 degree rotation is
> really useful.
Personally, I would rather see the rotate undo code fixed to handle any
rotation angle. Undo should always properly undo the last edit. When
ever new editing feature is added, the undo should be added at the same
time. I understand the rotate hot key is move convenient than using the
footprint (module) edit dialog to rotate footprints. However, the undo
works correctly when the footprint is rotated using the footprint edit
dialog.
That being said, this will tricky to implement because successive undo
rotate operations will likely lead to rounding errors unless integers
are used to save the rotation angle. It may be better to use the
UR_CHANGED undo type rather than UR_ROTATE this way you always have
correct angle from the previous rotation.
>
> Bye,
> imp
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
>
References