File tree Expand file tree Collapse file tree
node-graph/gcore/src/vector/vector_data Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -641,6 +641,15 @@ impl<'a> AppendBezpath<'a> {
641641 self . last_point_index = Some ( next_point_index) ;
642642 }
643643
644+ fn reset ( & mut self ) {
645+ self . first_point = None ;
646+ self . last_point = None ;
647+ self . first_point_index = None ;
648+ self . last_point_index = None ;
649+ self . first_segment_id = None ;
650+ self . last_segment_id = None ;
651+ }
652+
644653 pub fn append_bezpath ( vector_data : & ' a mut VectorData , bezpath : BezPath ) {
645654 let mut this = Self :: new ( vector_data) ;
646655 let mut elements = bezpath. elements ( ) . iter ( ) . peekable ( ) ;
@@ -679,8 +688,8 @@ impl<'a> AppendBezpath<'a> {
679688 }
680689 }
681690 PathEl :: ClosePath => {
682- // Already handled using `append_segment_and_close_path()`;
683- break ;
691+ // Already handled using `append_segment_and_close_path()` hence we reset state and continue.
692+ this . reset ( ) ;
684693 }
685694 }
686695 }
You can’t perform that action at this time.
0 commit comments