diff --git a/pagelayout_editor/design_tree_frame.cpp b/pagelayout_editor/design_tree_frame.cpp index 509806c943..86873e09e9 100644 --- a/pagelayout_editor/design_tree_frame.cpp +++ b/pagelayout_editor/design_tree_frame.cpp @@ -26,6 +26,7 @@ * @file design_tree_frame.cpp */ +#include #include #include #include diff --git a/pagelayout_editor/pl_editor_frame.cpp b/pagelayout_editor/pl_editor_frame.cpp index 4ddac56961..93ec6f492f 100644 --- a/pagelayout_editor/pl_editor_frame.cpp +++ b/pagelayout_editor/pl_editor_frame.cpp @@ -505,15 +505,14 @@ void PL_EDITOR_FRAME::RedrawActiveWindow( wxDC* aDC, bool aEraseBg ) void PL_EDITOR_FRAME::RebuildDesignTree() { const WORKSHEET_LAYOUT& pglayout = WORKSHEET_LAYOUT::GetTheInstance(); - wxString name; for( unsigned ii = 0; ii < pglayout.GetCount(); ii++ ) { WORKSHEET_DATAITEM* item = pglayout.GetItem( ii ); if( item->m_Name.IsEmpty() ) { - name.Printf( wxT("item%d:%s"), ii+1, item->GetClassName()); - item->m_Name = name; + item->m_Name = wxString::Format( wxT("item%d:%s"), ii+1, + GetChars(item->GetClassName()) ); } }