Commit aed1e5d4 authored by charras's avatar charras

Rework on TEXTE_PCB, SCH_TEXT and EDA_TextStruct classes.

Code seriously cleaned, obscure and duplicated code removed, and some oddities removed.
Better support of multiline texts.
parent 5759f734
...@@ -441,7 +441,11 @@ void AddMenusForText( wxMenu* PopMenu, SCH_TEXT* Text ) ...@@ -441,7 +441,11 @@ void AddMenusForText( wxMenu* PopMenu, SCH_TEXT* Text )
ADD_MENUITEM( PopMenu, ID_POPUP_SCH_EDIT_TEXT, _( "Edit Text" ), edit_text_xpm ); ADD_MENUITEM( PopMenu, ID_POPUP_SCH_EDIT_TEXT, _( "Edit Text" ), edit_text_xpm );
ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DELETE, _( "Delete Text" ), delete_text_xpm ); ADD_MENUITEM( PopMenu, ID_POPUP_SCH_DELETE, _( "Delete Text" ), delete_text_xpm );
// add menu change type text (to label, glabel, text): /* add menu change type text (to label, glabel, text),
* but only if this is a single line text
*/
if( Text->m_Text.Find( wxT("\n") ) == wxNOT_FOUND )
{
ADD_MENUITEM( menu_change_type, ID_POPUP_SCH_CHANGE_TYPE_TEXT_TO_LABEL, ADD_MENUITEM( menu_change_type, ID_POPUP_SCH_CHANGE_TYPE_TEXT_TO_LABEL,
_( "Change to Label" ), label2text_xpm ); _( "Change to Label" ), label2text_xpm );
ADD_MENUITEM( menu_change_type, ID_POPUP_SCH_CHANGE_TYPE_TEXT_TO_HLABEL, ADD_MENUITEM( menu_change_type, ID_POPUP_SCH_CHANGE_TYPE_TEXT_TO_HLABEL,
...@@ -450,6 +454,7 @@ void AddMenusForText( wxMenu* PopMenu, SCH_TEXT* Text ) ...@@ -450,6 +454,7 @@ void AddMenusForText( wxMenu* PopMenu, SCH_TEXT* Text )
_( "Change to Glabel" ), label2glabel_xpm ); _( "Change to Glabel" ), label2glabel_xpm );
ADD_MENUITEM_WITH_SUBMENU( PopMenu, menu_change_type, ADD_MENUITEM_WITH_SUBMENU( PopMenu, menu_change_type,
ID_POPUP_SCH_CHANGE_TYPE_TEXT, _( "Change Type" ), gl_change_xpm ); ID_POPUP_SCH_CHANGE_TYPE_TEXT, _( "Change Type" ), gl_change_xpm );
}
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment