KiBuzzard
KiBuzzard copied to clipboard
Add "Advanced Tools" from Buzzard Classic
- Adds "Advanced" Checkbox which reveals advanced options pane
- Adds Inline Formatting from Buzzard Classic
- Adds Overlining using KiCad syntax and overline style selection
- Adds UI buttons for commonly used symbols
Hey, technically, I can marge this myself but if you have a sec, @arturo182 , it'd be good to have a second set of eyes Cheers,
Sorry about that, somehow I missed the tag from last week. I have just tried it with KiCad nightly on Windows 11 and it ran into a few problems:
- Every time I open the dialog, it shows an error because the Thickness edit is empty which causes an Exception (even if Advanced is not checked):
(On a separate note, it would probably be better to make the Thickness control the same type as the other numerical controls. As you can see in my screenshot, they have the inc/dec buttons, even though they seem to be missing on your OS).
- Even once I put "1" into the Thickness edit, the preview doesn't refresh unless I change the Thickness value or style:
Ah, yes, this is why I asked for another set of eyes. The screen shots that I sent you aren't current (and neither was my testing) due to some weird behavior while installing and uninstalling packages in KiCad. I should have noticed immediately. I'll update soon with the fix.
+1
Okay, I believe I've fixed it. The latest push (build attached here) seems to work correctly on my machine. @arturo182 please test it on your end when you have a moment. cheers, KiBuzzard-1.2.3-pcm.zip
Thanks for the fixes :)
I have tested it and it works a lot better now!
There is something weird happening with the Padding, though. It seems the automatic Width calculation is causing issues, perhaps a circular dependency:
Even if these weird calculation issues are fixed, it seems that as long as changing the Padding updates the Width, then decreasing Left or Right padding will not have any effect because the old Width value will still be set and keeping the label wider than expected.
I also noticed that it's impossible to set Padding to 0, it will always change to 0.001, rounding/float issues.
And there is still a "FUnits" label in the Padding area which doesn't seem to do anything.
A note from a usability angle, the Special Character buttons always append the character to the text, I would expect them to insert the character at cursor position, and if there is a selection, replace the selection. That would align more with how regular typing works.
Excellent!
There is something weird happening with the Padding it's impossible to set Padding to 0 "FUnits" label in the Padding area
These bugs pre-exist my PR and appear to have been introduced in commit 88c4129. Fixing them seems to be outside the scope of this PR.
I agree with your usability note, it looks like wxStyledTextCtrl has a method to retrieve the caret position, so I can try inserting the symbol there.
Please advise.
Oh, my bad, I've been using the 1.5.0 release, #99 was merged after that so I didn't realize it wasn't a part of this. Please ignore my comments regarding that, but @gregdavill, maybe we should revert that PR?
Regarding the usability, if it's not too much work to implement the changes, it would be great to get them in before merging :)
Thanks!
@arturo182 Whoops, looks like I didn't test that PR fully. I'll open an issue and look into it, might be easier to just fix rather than a full revert.
Sure, since it's not a part of any release yet, fixing it would work too. But I would definitely advise against making a release with the current state.
A note from a usability angle, the Special Character buttons always append the character to the text, I would expect them to insert the character at cursor position, and if there is a selection, replace the selection.
Okay, I tried to get this to work but I can't make it work reliably. It seems like either GetCurrentPos() or GotoPos() from wx doesn't behave as expected when certain special characters are present? The first character insertion always works correctly, but subsequent character insertions will reliably skip certain positions in the string.
I am tempted to go ahead and pull this as-is, if there are no objections. If it turns out there's an alternate behavior for those buttons that people prefer (copy to clipboard?) then that can be a new Issue. I peeked at the conflicts and it'll be a quick merge.
Cheers everyone
Sounds good, if you can resolve the conflicts and push the update, I will try it out and if all looks good, we can merge :)
I think I've done it @arturo182 try it out when you get a chance, thanks!
Hi all, as it looks like we'll be working to get the "correct sizing" issue amended and then jumping into KiCad v8 compatibility, I'm going to go ahead and pull this now before it gets too far behind. It's been available for testing for a month and a half. If you find that it breaks anything, please revert.
Thanks @NPoole! Sorry for not taking a look sooner.
As checked in this throws some errors. and notably you've not included an updated text_dialog.fbp for wxformbuilder which we use to generate text_dialog.py.
➤ pcbnew
/home/greg/Projects/KiBuzzard/KiBuzzard/dialog/compat.py:17: wxPyDeprecationWarning: Call to deprecated item. Use SetSizeHints instead.
super(wx.Dialog, self).SetSizeHintsSz( a,b)
Exception on python action plugin code
Traceback (most recent call last):
File "/home/greg/Projects/KiBuzzard/KiBuzzard/plugin.py", line 114, in Run
dlg = Dialog(self._pcbnew_frame, self.config_file, Buzzard(), run_buzzard)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/greg/Projects/KiBuzzard/KiBuzzard/dialog/dialog.py", line 66, in __init__
self.m_PaddingUnits.SetLabel("")
^^^^^^^^^^^^^^^^^^^
AttributeError: 'Dialog' object has no attribute 'm_PaddingUnits'