Make symbol/footprint trees sensitive to language change.
(cherry picked from commit eef3492fc0
)
This commit is contained in:
parent
724262651f
commit
1f34883a27
|
@ -613,7 +613,7 @@ void EDA_DRAW_FRAME::DisplayGridMsg()
|
||||||
{
|
{
|
||||||
wxString msg;
|
wxString msg;
|
||||||
|
|
||||||
msg.Printf( wxS( "grid %s" ), MessageTextFromValue( GetCanvas()->GetGAL()->GetGridSize().x,
|
msg.Printf( _( "grid %s" ), MessageTextFromValue( GetCanvas()->GetGAL()->GetGridSize().x,
|
||||||
false ) );
|
false ) );
|
||||||
|
|
||||||
SetStatusText( msg, 4 );
|
SetStatusText( msg, 4 );
|
||||||
|
|
|
@ -269,7 +269,7 @@ void LIB_TREE_MODEL_ADAPTER::recreateColumns()
|
||||||
for( const wxString& colName : m_shownColumns )
|
for( const wxString& colName : m_shownColumns )
|
||||||
{
|
{
|
||||||
if( !m_colNameMap.count( colName ) )
|
if( !m_colNameMap.count( colName ) )
|
||||||
doAddColumn( colName, false );
|
doAddColumn( colName, colName == wxT( "Description" ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -185,6 +185,16 @@ LIB_TREE::~LIB_TREE()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void LIB_TREE::ShowChangedLanguage()
|
||||||
|
{
|
||||||
|
if( m_query_ctrl )
|
||||||
|
m_query_ctrl->SetDescriptiveText( _( "Filter" ) );
|
||||||
|
|
||||||
|
if( m_adapter )
|
||||||
|
m_adapter->ShowChangedLanguage();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
LIB_ID LIB_TREE::GetSelectedLibId( int* aUnit ) const
|
LIB_ID LIB_TREE::GetSelectedLibId( int* aUnit ) const
|
||||||
{
|
{
|
||||||
wxDataViewItem sel = m_tree_ctrl->GetSelection();
|
wxDataViewItem sel = m_tree_ctrl->GetSelection();
|
||||||
|
|
|
@ -1199,6 +1199,16 @@ void SYMBOL_EDIT_FRAME::ShowChangedLanguage()
|
||||||
// tooltips in toolbars
|
// tooltips in toolbars
|
||||||
RecreateToolbars();
|
RecreateToolbars();
|
||||||
|
|
||||||
|
// For some obscure reason, the AUI manager hides the first modified pane.
|
||||||
|
// So force show panes
|
||||||
|
wxAuiPaneInfo& tree_pane_info = m_auimgr.GetPane( m_treePane );
|
||||||
|
bool tree_shown = tree_pane_info.IsShown();
|
||||||
|
tree_pane_info.Caption( _( "Libraries" ) );
|
||||||
|
tree_pane_info.Show( tree_shown );
|
||||||
|
m_auimgr.Update();
|
||||||
|
|
||||||
|
m_treePane->GetLibTree()->ShowChangedLanguage();
|
||||||
|
|
||||||
// status bar
|
// status bar
|
||||||
UpdateMsgPanel();
|
UpdateMsgPanel();
|
||||||
|
|
||||||
|
|
|
@ -181,11 +181,6 @@ public:
|
||||||
const std::vector<LIB_TREE_ITEM*>& aItemList,
|
const std::vector<LIB_TREE_ITEM*>& aItemList,
|
||||||
bool pinned, bool presorted );
|
bool pinned, bool presorted );
|
||||||
|
|
||||||
void AddColumn( const wxString& aHeader )
|
|
||||||
{
|
|
||||||
doAddColumn( aHeader, false );
|
|
||||||
}
|
|
||||||
|
|
||||||
std::vector<wxString> GetAvailableColumns() const { return m_availableColumns; }
|
std::vector<wxString> GetAvailableColumns() const { return m_availableColumns; }
|
||||||
|
|
||||||
std::vector<wxString> GetShownColumns() const { return m_shownColumns; }
|
std::vector<wxString> GetShownColumns() const { return m_shownColumns; }
|
||||||
|
@ -303,6 +298,11 @@ public:
|
||||||
void PinLibrary( LIB_TREE_NODE* aTreeNode );
|
void PinLibrary( LIB_TREE_NODE* aTreeNode );
|
||||||
void UnpinLibrary( LIB_TREE_NODE* aTreeNode );
|
void UnpinLibrary( LIB_TREE_NODE* aTreeNode );
|
||||||
|
|
||||||
|
void ShowChangedLanguage()
|
||||||
|
{
|
||||||
|
recreateColumns();
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/**
|
/**
|
||||||
* Convert #SYM_TREE_NODE -> wxDataViewItem.
|
* Convert #SYM_TREE_NODE -> wxDataViewItem.
|
||||||
|
|
|
@ -144,6 +144,8 @@ public:
|
||||||
*/
|
*/
|
||||||
void FocusSearchFieldIfExists();
|
void FocusSearchFieldIfExists();
|
||||||
|
|
||||||
|
void ShowChangedLanguage();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/**
|
/**
|
||||||
* Expand or collapse a node, switching it to the opposite state.
|
* Expand or collapse a node, switching it to the opposite state.
|
||||||
|
|
|
@ -873,6 +873,8 @@ void FOOTPRINT_EDIT_FRAME::ShowChangedLanguage()
|
||||||
tree_pane_info.Show( tree_shown );
|
tree_pane_info.Show( tree_shown );
|
||||||
m_auimgr.Update();
|
m_auimgr.Update();
|
||||||
|
|
||||||
|
m_treePane->GetLibTree()->ShowChangedLanguage();
|
||||||
|
|
||||||
UpdateTitle();
|
UpdateTitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1005,6 +1005,8 @@ void APPEARANCE_CONTROLS::OnLanguageChanged()
|
||||||
{
|
{
|
||||||
m_notebook->SetPageText( 0, _( "Layers" ) );
|
m_notebook->SetPageText( 0, _( "Layers" ) );
|
||||||
m_notebook->SetPageText( 1, _( "Objects" ) );
|
m_notebook->SetPageText( 1, _( "Objects" ) );
|
||||||
|
|
||||||
|
if( m_notebook->GetPageCount() >= 3 )
|
||||||
m_notebook->SetPageText( 2, _( "Nets" ) );
|
m_notebook->SetPageText( 2, _( "Nets" ) );
|
||||||
|
|
||||||
Freeze();
|
Freeze();
|
||||||
|
|
Loading…
Reference in New Issue