kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #18263
Re: [PATCH] Cleaner entry of arc angles
Blair,
I was looking at this patch and I like the idea of entering arc angles
in degrees instead of deci-degrees. I'm sure most users will appreciate
it. However, the wxSpinCtrl hack needs to be replaced by using a
wxSpinCtrl when creating the dialog with wxFormBuilder. wxFormBuilder
v3.5 supports wxSpinCtrl. This is kind of polishing that I would like
to see make it into the stable release.
Wayne
On 4/10/2015 11:58 PM, Blair Bonnett wrote:
> Hi all,
>
> Currently, angles (e.g., when editing a graphic arc in PcbNew) have to
> be entered in deci-degrees which is not the nicest IMHO. There is a
> wxSpinCtrlDouble widget [1] which was added in version 2.9.0 of
> wxWidgets [2] which is the ideal widget for this purpose. Unfortunately,
> wxFormBuilder doesn't support it yet [3] which means something of a hack
> is required to use it.
>
> What I've done is replaced the m_Angle_Ctrl textfield in the form editor
> with a standard (integer-only) wxSpinCtrl called
> m_Angle_Ctrl_Placeholder. The actual dialog then creates a
> wxSpinCtrlDouble in the constructor and puts it into the dialog instead
> of the placeholder.
>
> This means that any changes made to the properties of the placeholder in
> the form builder will be ignored (but hopefully its name will suggest
> this). The location of the placeholder is copied to the real widget so
> any layout changes to the form as a whole shouldn't break anything.
> Doing it this way also means that regenerating the base code in the form
> builder doesn't break anything.
>
> The attached patch does this for editing graphic arcs in both pcbnew and
> modedit. I wanted to see if there were any objections and/or suggestions
> of a better method before changing the rest of the angle entry widgets.
> Once this is OKed I'll go through and update the rest of them.
>
> Cheers,
> Blair
>
>
> [1] http://docs.wxwidgets.org/trunk/classwx_spin_ctrl_double.html
> [2] https://github.com/wxWidgets/wxWidgets/blob/master/docs/changes_30.txt#L1417
> [3] http://sourceforge.net/p/wxformbuilder/feature-requests/45/
>
>
> _______________________________________________
> 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
>
Follow ups
References