Skip to content

Commit 7499d03

Browse files
committed
Moved set-message-center call to start-update-thread.
When a 3d plot snip is resized (e.g when using `plot3d-frame`), a new position for the "altitude angle" message needs to be computed. However, since the message is in the middle of the plot area, the new message location cannot be set in the `resize` method, as we don't have a new plot area just yet. Instead, the `set-message-center` call has to be delayed until a new area is created, which is in `start-update-thread`.
1 parent d2d252f commit 7499d03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plot-gui-lib/plot/private/gui/snip3d.rkt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
(cond [(is-a? new-bm bitmap%)
7070
(set! area new-area)
7171
(set-bitmap new-bm)
72+
(set-message-center)
7273
(when (not (and (= last-angle angle)
7374
(= last-altitude altitude)))
7475
(set-angles-message))
@@ -134,7 +135,6 @@
134135
(when (not (and (= w width) (= h height)))
135136
(set! width w)
136137
(set! height h)
137-
(set-message-center)
138138
(stop-message)
139139
(when (not (update-thread-running?))
140140
(start-update-thread #t))

0 commit comments

Comments
 (0)