Permalink
Browse files

declarative: Do custom widget setup before setting enabled and font

This is required for propagation of enabled and font to TabWidget pages
  • Loading branch information...
1 parent d105b1c commit 141d4eed9275a68a62a0ed6d63eb67852aa5812a @lxn committed Oct 6, 2012
Showing with 7 additions and 7 deletions.
  1. +7 −7 declarative/util.go
View
@@ -87,6 +87,13 @@ func InitWidget(d Widget, w walk.Widget, customInit func() error) error {
}
}
+ // Custom
+ if customInit != nil {
+ if err := customInit(); err != nil {
+ return err
+ }
+ }
+
// Widget continued
w.SetEnabled(!disabled)
w.SetVisible(!hidden)
@@ -99,13 +106,6 @@ func InitWidget(d Widget, w walk.Widget, customInit func() error) error {
}
}
- // Custom
- if customInit != nil {
- if err := customInit(); err != nil {
- return err
- }
- }
-
succeeded = true
return nil

0 comments on commit 141d4ee

Please sign in to comment.