From aff7416b65281458ba478ec24b77d94b183e3b82 Mon Sep 17 00:00:00 2001 From: Arne Dußin Date: Sun, 15 Nov 2020 19:47:39 +0100 Subject: Fix the dimension indicators persisting after add The dimension indicators were drawn very for the blink of an eye when starting a rect that comes after the first. This commit should fix that. --- src/dimension_indicator.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/dimension_indicator.rs') diff --git a/src/dimension_indicator.rs b/src/dimension_indicator.rs index 0ea96d3..2eb3eee 100644 --- a/src/dimension_indicator.rs +++ b/src/dimension_indicator.rs @@ -24,6 +24,10 @@ impl DimensionIndicator { this } + pub fn clear_dimensions(&mut self) { + self.length_lines.clear(); + } + /// Update the dimensions by analysing a given set of points and adjusting the internal /// (measured) dimensions. pub fn update_dimensions(&mut self, corner_points: &[Vec2]) { -- cgit v1.2.3-70-g09d2