summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/timeline/TimelineModel.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp

index 11344e60..b904dfd7 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp
@@ -320,7 +320,10 @@ eventPropHeight(const mtx::events::RoomEvent<T> &e) auto w = eventWidth(e); if (w == 0) w = 1; - return eventHeight(e) / (double)w; + + double prop = eventHeight(e) / (double)w; + + return prop > 0 ? prop : 1.; } }