Skip to content

Commit 1497fb6

Browse files
committed
Properly update GUI sections on import
1 parent e707080 commit 1497fb6

File tree

2 files changed

+45
-44
lines changed

2 files changed

+45
-44
lines changed

kikit/actionPlugins/panelize.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,7 @@ def onImport(self, evt):
568568
with open(pathname, "r") as file:
569569
preset = json.load(file)
570570
self.populateInitialValue(preset)
571+
self.OnChange()
571572
except Exception as e:
572573
wx.MessageBox(f"Cannot load configuration: {e}", "Error",
573574
style=wx.OK | wx.ICON_ERROR, parent=self)

kikit/panelize_ui_sections.py

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ def never():
238238
"Layout type"),
239239
"alternation": SChoice(
240240
["none", "rows", "cols", "rowsCols"],
241-
typeIn(["grid"]),
241+
typeIn(["grid", "plugin"]),
242242
"Specify alternations of board rotation"),
243243
"hspace": SLength(
244244
always(),
@@ -250,31 +250,31 @@ def never():
250250
never(),
251251
"Specify the gap between the boards in both direction"),
252252
"hbackbone": SLength(
253-
typeIn(["grid"]),
253+
typeIn(["grid", "plugin"]),
254254
"The width of horizontal backbone (0 means no backbone)"),
255255
"vbackbone": SLength(
256-
typeIn(["grid"]),
256+
typeIn(["grid", "plugin"]),
257257
"The width of vertical backbone (0 means no backbone)"),
258258
"hboneskip": SNum(
259-
typeIn(["grid"]),
259+
typeIn(["grid", "plugin"]),
260260
"Skip every given number of horizontal backbones"),
261261
"vboneskip": SNum(
262-
typeIn(["grid"]),
262+
typeIn(["grid", "plugin"]),
263263
"Skip every given number of vertical backbones"),
264264
"rotation": SAngle(
265265
always(),
266266
"Rotate the boards before placing them in the panel"),
267267
"rows": SNum(
268-
typeIn(["grid"]),
268+
typeIn(["grid", "plugin"]),
269269
"Specify the number of rows in the grid pattern"),
270270
"cols": SNum(
271-
typeIn(["grid"]),
271+
typeIn(["grid", "plugin"]),
272272
"Specify the number of columns in the grid pattern"),
273273
"vbonecut": SBool(
274-
typeIn(["grid"]),
274+
typeIn(["grid", "plugin"]),
275275
"Add cuts in vertical backbones for easier depanelization"),
276276
"hbonecut": SBool(
277-
typeIn(["grid"]),
277+
typeIn(["grid", "plugin"]),
278278
"Add cuts in horizontal backbones for easier depanelization"),
279279
"renamenet": SStr(
280280
always(),
@@ -339,31 +339,31 @@ def ppSource(section):
339339
always(),
340340
"Tab type"),
341341
"vwidth": SLength(
342-
typeIn(["fixed", "spacing"]),
342+
typeIn(["fixed", "spacing", "plugin"]),
343343
"Specify width of vertical tabs"),
344344
"hwidth": SLength(
345-
typeIn(["fixed", "spacing"]),
345+
typeIn(["fixed", "spacing", "plugin"]),
346346
"Specify width of vertical tabs"),
347347
"width": SLength(
348-
typeIn(["corner"]),
348+
typeIn(["corner", "plugin"]),
349349
"Specify tab width"),
350350
"mindistance": SLength(
351-
typeIn(["fixed"]),
351+
typeIn(["fixed", "plugin"]),
352352
"Minimal spacing between the tabs. If there are too many tabs, their count is reduced."),
353353
"spacing": SLength(
354-
typeIn(["spacing"]),
354+
typeIn(["spacing", "plugin"]),
355355
"The maximum spacing of the tabs."),
356356
"vcount": SNum(
357-
typeIn(["fixed"]),
357+
typeIn(["fixed", "plugin"]),
358358
"Number of tabs in a given direction."),
359359
"hcount": SNum(
360-
typeIn(["fixed"]),
360+
typeIn(["fixed", "plugin"]),
361361
"Number of tabs in a given direction."),
362362
"cutout": SLength(
363-
typeIn(["fixed"]),
363+
typeIn(["fixed", "plugin"]),
364364
"Depth of cutouts into the frame"),
365365
"tabfootprints": SFootprintList(
366-
typeIn(["annotation"]),
366+
typeIn(["annotation", "plugin"]),
367367
"Specify custom footprints that will be used for tab annotations."),
368368
"fillet": SLength(
369369
typeIn(["fixed", "spacing", "corner", "annotation", "plugin"]),
@@ -389,25 +389,25 @@ def ppTabs(section):
389389
always(),
390390
"Cut type"),
391391
"drill": SLength(
392-
typeIn(["mousebites"]),
392+
typeIn(["mousebites", "plugin"]),
393393
"Drill diameter"),
394394
"spacing": SLength(
395-
typeIn(["mousebites"]),
395+
typeIn(["mousebites", "plugin"]),
396396
"Hole spacing"),
397397
"offset": SLength(
398-
typeIn(["mousebites", "vcuts"]),
398+
typeIn(["mousebites", "vcuts", "plugin"]),
399399
"Offset cuts into the board"),
400400
"prolong": SLength(
401-
typeIn(["mousebites", "layer"]),
401+
typeIn(["mousebites", "layer", "plugin"]),
402402
"Tangentiall prolong cuts (to cut mill fillets)"),
403403
"clearance": SLength(
404-
typeIn(["vcuts"]),
404+
typeIn(["vcuts", "plugin"]),
405405
"Add copper clearance around V-cuts"),
406406
"cutcurves": SBool(
407-
typeIn(["vcuts"]),
407+
typeIn(["vcuts", "plugin"]),
408408
"Approximate curves with straight cut"),
409409
"layer": SLayer(
410-
typeIn(["vcuts", "layer"]),
410+
typeIn(["vcuts", "layer", "plugin"]),
411411
"Specify layer for the drawings"),
412412
"code": SPlugin(
413413
plugin.CutsPlugin,
@@ -427,45 +427,45 @@ def ppCuts(section):
427427
always(),
428428
"Framing type"),
429429
"hspace": SLength(
430-
typeIn(["frame", "railslr", "tightframe"]),
430+
typeIn(["frame", "railslr", "tightframe", "plugin"]),
431431
"Horizontal space between PCBs and the frame"),
432432
"vspace": SLength(
433-
typeIn(["frame", "railstb", "tightframe"]),
433+
typeIn(["frame", "railstb", "tightframe", "plugin"]),
434434
"Vertical space between PCBs and the frame"),
435435
"space": SLength(
436436
never(),
437437
"Space between frame/rails and PCBs"),
438438
"width": SLength(
439-
typeIn(["frame", "railstb", "railslr", "tightframe"]),
439+
typeIn(["frame", "railstb", "railslr", "tightframe", "plugin"]),
440440
"Width of the framing"),
441441
"mintotalheight": SLength(
442-
typeIn(["frame", "railstb", "tightframe"]),
442+
typeIn(["frame", "railstb", "tightframe", "plugin"]),
443443
"Minimal height of the panel"
444444
),
445445
"mintotalwidth": SLength(
446-
typeIn(["frame", "raillr", "tightframe"]),
446+
typeIn(["frame", "raillr", "tightframe", "plugin"]),
447447
"Minimal width of the panel"
448448
),
449449
"maxtotalheight": SLength(
450-
typeIn(["frame", "railstb", "tightframe"]),
450+
typeIn(["frame", "railstb", "tightframe", "plugin"]),
451451
"Maximal height of the panel"
452452
),
453453
"maxtotalwidth": SLength(
454-
typeIn(["frame", "raillr", "tightframe"]),
454+
typeIn(["frame", "raillr", "tightframe", "plugin"]),
455455
"Maximal width of the panel"
456456
),
457457
"slotwidth": SLength(
458-
typeIn(["tightframe"]),
458+
typeIn(["tightframe", "plugin"]),
459459
"Width of the milled slot"),
460460
"cuts": SChoice(
461461
["none", "both", "v", "h"],
462-
typeIn(["frame"]),
462+
typeIn(["frame", "plugin"]),
463463
"Add cuts to the corners of the frame"),
464464
"chamfer": SLength(
465-
typeIn(["tightframe", "frame", "railslr", "railstb"]),
465+
typeIn(["tightframe", "frame", "railslr", "railstb", "plugin"]),
466466
"Add chamfer to the 4 corners of the panel. Specify chamfer width."),
467467
"fillet": SLength(
468-
typeIn(["tightframe", "frame", "railslr", "railstb"]),
468+
typeIn(["tightframe", "frame", "railslr", "railstb", "plugin"]),
469469
"Add fillet to the 4 corners of the panel. Specify fillet radius."),
470470
"code": SPlugin(
471471
plugin.FramingPlugin,
@@ -488,16 +488,16 @@ def ppFraming(section):
488488
always(),
489489
"Tooling type"),
490490
"hoffset": SLength(
491-
typeIn(["3hole", "4hole"]),
491+
typeIn(["3hole", "4hole", "plugin"]),
492492
"Horizontal offset for the hole"),
493493
"voffset": SLength(
494-
typeIn(["3hole", "4hole"]),
494+
typeIn(["3hole", "4hole", "plugin"]),
495495
"Vertical offset for the hole"),
496496
"size": SLength(
497-
typeIn(["3hole", "4hole"]),
497+
typeIn(["3hole", "4hole", "plugin"]),
498498
"Hole diameter"),
499499
"paste": SBool(
500-
typeIn(["3hole", "4hole"]),
500+
typeIn(["3hole", "4hole", "plugin"]),
501501
"Include holes on the paste layer"),
502502
"code": SPlugin(
503503
plugin.ToolingPlugin,
@@ -517,16 +517,16 @@ def ppTooling(section):
517517
always(),
518518
"Fiducial type"),
519519
"hoffset": SLength(
520-
typeIn(["3fid", "4fid"]),
520+
typeIn(["3fid", "4fid", "plugin"]),
521521
"Horizontal offset for the fiducial"),
522522
"voffset": SLength(
523-
typeIn(["3fid", "4fid"]),
523+
typeIn(["3fid", "4fid", "plugin"]),
524524
"Horizontal offset for the fiducial"),
525525
"coppersize": SLength(
526-
typeIn(["3fid", "4fid"]),
526+
typeIn(["3fid", "4fid", "plugin"]),
527527
"Diameter of the copper part"),
528528
"opening": SLength(
529-
typeIn(["3fid", "4fid"]),
529+
typeIn(["3fid", "4fid", "plugin"]),
530530
"Diameter of the opening"),
531531
"code": SPlugin(
532532
plugin.FiducialsPlugin,

0 commit comments

Comments
 (0)