From 5f0ffe84905ec53d02bfc38653baa31a510463e3 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Tue, 9 Oct 2018 19:43:47 +0100 Subject: [PATCH] Copy isDangling flag when changing label type. Fixes: lp:1796775 * https://bugs.launchpad.net/kicad/+bug/1796775 --- eeschema/edit_label.cpp | 1 + eeschema/sch_text.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/eeschema/edit_label.cpp b/eeschema/edit_label.cpp index b6da029b3f..74610fbde7 100644 --- a/eeschema/edit_label.cpp +++ b/eeschema/edit_label.cpp @@ -203,6 +203,7 @@ void SCH_EDIT_FRAME::OnConvertTextType( wxCommandEvent& aEvent ) newtext->SetThickness( text->GetThickness() ); newtext->SetItalic( text->IsItalic() ); newtext->SetBold( text->IsBold() ); + newtext->SetIsDangling( text->IsDangling() ); /* Save the new text in undo list if the old text was not itself a "new created text" * In this case, the old text is already in undo list as a deleted item. diff --git a/eeschema/sch_text.h b/eeschema/sch_text.h index 939c0e9c09..444b4ab594 100644 --- a/eeschema/sch_text.h +++ b/eeschema/sch_text.h @@ -176,6 +176,8 @@ public: virtual bool IsDangling() const override { return m_isDangling; } + virtual void SetIsDangling( bool aIsDangling ) { m_isDangling = aIsDangling; } + virtual bool IsSelectStateChanged( const wxRect& aRect ) override; virtual void GetConnectionPoints( std::vector< wxPoint >& aPoints ) const override;