From 61454f0124ff9680363fa6ca54950cd4ad3cc796 Mon Sep 17 00:00:00 2001 From: CHARRAS Date: Thu, 21 Feb 2008 15:50:35 +0000 Subject: [PATCH] eeschema: problem when undelete after a change a label type solved (I hope) --- change_log.txt | 3 +-- eeschema/edit_label.cpp | 7 ++++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/change_log.txt b/change_log.txt index 48bab6a39a..fa34b35417 100644 --- a/change_log.txt +++ b/change_log.txt @@ -14,8 +14,7 @@ email address. - reference not copied in component copy. - incorrect redo when changing the chip name in component edition - bugs not fixed - - undo/redo problems when changing a text type between text, label, global label and hierarchical label + bugs not fixed: - incorrect annotation in complex hierarchy with multi parts per package (duplicates created). diff --git a/eeschema/edit_label.cpp b/eeschema/edit_label.cpp index abc0099822..eb8ef9fa28 100644 --- a/eeschema/edit_label.cpp +++ b/eeschema/edit_label.cpp @@ -396,7 +396,8 @@ void WinEDA_SchematicFrame::ConvertTextType( DrawTextStruct* Text, GetScreen()->SetCurItem( NULL ); g_ItemToRepeat = NULL; } - GetScreen()->SetCurItem( newtext ); + + GetScreen()->SetCurItem( NULL ); SAFE_DELETE( g_ItemToUndoCopy ); @@ -412,11 +413,15 @@ void WinEDA_SchematicFrame::ConvertTextType( DrawTextStruct* Text, SaveCopyInUndoList( newtext, IS_NEW ); } else + { + GetScreen()->SetCurItem( newtext ); newtext->m_Flags = IS_NEW; + } if( (flags & IS_MOVED) != 0 ) { + GetScreen()->SetCurItem( newtext ); StartMoveTexte( newtext, DC ); }