Re: [Kicad-developers] Adding "Apply" to the 3D viewer display options dialog
Select the Apply button you want to handle, and in the Object Properties panel, Events tab - add an event handler. It will be added to the generated *_BASE class and all you need to do is override it. Cheers, Orson On 07/24/2018 09:10 AM, David Griffith wrote: > > I'm at a loss to figure out what to edit to get the display options > dialog for the 3D viewer to do the right thing when an "Apply" button is > pressed. I got the new button added by way of wxFormBuilder. But > looking at 3d-viewer/3d_viewer/dialogs/dialog_3D_view_option.cpp, I > can't figure out how to get it working. I don't see how OK or Cancel > are processed, so I can't use them as a model. > > signature.asc Description: OpenPGP digital signature ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
Re: [Kicad-developers] Adding "Apply" to the 3D viewer display options dialog
Hi David, The wxWidgets framework will process OK and Cancel for us (assuming we don’t need anything special). They call TransferDataFromWindow to do the dirty work in the case of an OK. Other Kicad dialogs do have to do something more special, though, and so implement their own processing. You’d also need to implement your own for an Apply button. Cheers, Jeff. > On 24 Jul 2018, at 08:10, David Griffith wrote: > > > I'm at a loss to figure out what to edit to get the display options dialog > for the 3D viewer to do the right thing when an "Apply" button is pressed. I > got the new button added by way of wxFormBuilder. But looking at > 3d-viewer/3d_viewer/dialogs/dialog_3D_view_option.cpp, I can't figure out how > to get it working. I don't see how OK or Cancel are processed, so I can't > use them as a model. > > > -- > David Griffith > d...@661.org > > A: Because it fouls the order in which people normally read text. > Q: Why is top-posting such a bad thing? > A: Top-posting. > Q: What is the most annoying thing in e-mail? > > ___ > Mailing list: https://launchpad.net/~kicad-developers > Post to : kicad-developers@lists.launchpad.net > Unsubscribe : https://launchpad.net/~kicad-developers > More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
[Kicad-developers] Adding "Apply" to the 3D viewer display options dialog
I'm at a loss to figure out what to edit to get the display options dialog for the 3D viewer to do the right thing when an "Apply" button is pressed. I got the new button added by way of wxFormBuilder. But looking at 3d-viewer/3d_viewer/dialogs/dialog_3D_view_option.cpp, I can't figure out how to get it working. I don't see how OK or Cancel are processed, so I can't use them as a model. -- David Griffith d...@661.org A: Because it fouls the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp