macro-stepper: eliminated spurious update on initial frame "resize"
svn: r16406 original commit: 98ce5f37afee9e6c5f2b6261621cae63a9195211
This commit is contained in:
parent
9bc38dd1c1
commit
225ea79377
|
@ -33,6 +33,7 @@
|
||||||
(define obsoleted? #f)
|
(define obsoleted? #f)
|
||||||
|
|
||||||
(inherit get-area-container
|
(inherit get-area-container
|
||||||
|
get-size
|
||||||
set-label
|
set-label
|
||||||
get-menu%
|
get-menu%
|
||||||
get-menu-item%
|
get-menu-item%
|
||||||
|
@ -53,10 +54,16 @@
|
||||||
" - Macro stepper")
|
" - Macro stepper")
|
||||||
"Macro stepper"))
|
"Macro stepper"))
|
||||||
|
|
||||||
|
;; Grrr... we get a spurious on-size event sometime after the
|
||||||
|
;; frame is created, probably when the window-manager gets around
|
||||||
|
;; to doing something. Avoid unnecessary updates.
|
||||||
|
(define-values (w0 h0) (get-size))
|
||||||
(define/override (on-size w h)
|
(define/override (on-size w h)
|
||||||
(send: config config<%> set-width w)
|
(send: config config<%> set-width w)
|
||||||
(send: config config<%> set-height h)
|
(send: config config<%> set-height h)
|
||||||
|
(unless (and (= w0 w) (= h0 h))
|
||||||
(send: widget widget<%> update/preserve-view))
|
(send: widget widget<%> update/preserve-view))
|
||||||
|
(set!-values (w0 h0) (values w h)))
|
||||||
|
|
||||||
(define warning-panel
|
(define warning-panel
|
||||||
(new horizontal-panel%
|
(new horizontal-panel%
|
||||||
|
|
Loading…
Reference in New Issue
Block a user