X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fviews%2Ftrace%2Fdecodetrace.cpp;fp=pv%2Fviews%2Ftrace%2Fdecodetrace.cpp;h=c451635fbd6c3b86830f1a7b6fa17e24981e988f;hp=d826587e507fbcbf03464cc8292700bf5b44ea3e;hb=8b24af15d583c1df24b49f9709ff9156a9faa16e;hpb=09ab7056e772e3b85889eb1c508597b3cc7bfbe4 diff --git a/pv/views/trace/decodetrace.cpp b/pv/views/trace/decodetrace.cpp index d826587e..c451635f 100644 --- a/pv/views/trace/decodetrace.cpp +++ b/pv/views/trace/decodetrace.cpp @@ -1834,7 +1834,7 @@ void DecodeTrace::on_animation_timer() if (r.expanding) { if (r.height < r.expanded_height) { r.anim_height += height_delta / (float)AnimationDurationInTicks; - r.height = r.anim_height; + r.height = min((int)r.anim_height, (int)r.expanded_height); r.anim_shape += ArrowSize / (float)AnimationDurationInTicks; animation_finished = false; } else @@ -1844,7 +1844,7 @@ void DecodeTrace::on_animation_timer() if (r.collapsing) { if (r.height > default_row_height_) { r.anim_height -= height_delta / (float)AnimationDurationInTicks; - r.height = r.anim_height; + r.height = max((int)r.anim_height, (int)0); r.anim_shape -= ArrowSize / (float)AnimationDurationInTicks; animation_finished = false; } else