Skip to content

Commit

Permalink
Fixing interface cast crash on log window
Browse files Browse the repository at this point in the history
  • Loading branch information
BrentFarris committed May 8, 2024
1 parent e0d3af1 commit 20262f8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/editor/ui/log_window/log_window.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,11 @@ func (l *LogWindow) reloadUI() {
l.doc.Clean()
if s, ok := editor_cache.EditorConfigValue(sizeConfig); ok {
w, _ := l.doc.GetElementById("window")
w.UIPanel.Layout().ScaleHeight(matrix.Float(s.(float64)))
if f32, ok := s.(float32); ok {
w.UIPanel.Layout().ScaleHeight(matrix.Float(f32))
} else if f64, ok := s.(float64); ok {
w.UIPanel.Layout().ScaleHeight(matrix.Float(f64))
}
}
}

Expand Down

0 comments on commit 20262f8

Please sign in to comment.