Commit e4467d4d authored by charras's avatar charras

fixed minor problem in Eeschema library viewer

parent 15e07345
......@@ -26,7 +26,7 @@ void WinEDA_ViewlibFrame::ReCreateHToolbar()
if( m_HToolBar == NULL )
{
m_HToolBar = new WinEDA_Toolbar( TOOLBAR_MAIN, this, ID_H_TOOLBAR,
TRUE );
true );
SetToolBar( m_HToolBar );
// Set up toolbar
......@@ -86,7 +86,7 @@ void WinEDA_ViewlibFrame::ReCreateHToolbar()
m_HToolBar->AddTool( ID_LIBVIEW_VIEWDOC, wxEmptyString,
wxBitmap( datasheet_xpm ),
_( "View component documents" ) );
m_HToolBar->EnableTool( ID_LIBVIEW_VIEWDOC, FALSE );
m_HToolBar->EnableTool( ID_LIBVIEW_VIEWDOC, false );
if( m_Semaphore ) // The lib browser is called from a "load component" command
{
......@@ -119,12 +119,23 @@ void WinEDA_ViewlibFrame::ReCreateHToolbar()
}
// Must be AFTER Realize():
m_HToolBar->ToggleTool( ID_LIBVIEW_DE_MORGAN_NORMAL_BUTT,
(m_convert <= 1) ? TRUE : FALSE );
m_HToolBar->ToggleTool( ID_LIBVIEW_DE_MORGAN_CONVERT_BUTT,
(m_convert >= 2) ? TRUE : FALSE );
m_HToolBar->EnableTool( ID_LIBVIEW_DE_MORGAN_CONVERT_BUTT, asdeMorgan );
m_HToolBar->EnableTool( ID_LIBVIEW_DE_MORGAN_NORMAL_BUTT, asdeMorgan );
if( asdeMorgan )
{
m_HToolBar->ToggleTool( ID_LIBVIEW_DE_MORGAN_NORMAL_BUTT,
(m_convert <= 1) ? true : false );
m_HToolBar->ToggleTool( ID_LIBVIEW_DE_MORGAN_CONVERT_BUTT,
(m_convert >= 2) ? true : false );
m_HToolBar->EnableTool( ID_LIBVIEW_DE_MORGAN_CONVERT_BUTT, true );
m_HToolBar->EnableTool( ID_LIBVIEW_DE_MORGAN_NORMAL_BUTT, true );
}
else
{
m_HToolBar->ToggleTool( ID_LIBVIEW_DE_MORGAN_NORMAL_BUTT, true );
m_HToolBar->ToggleTool( ID_LIBVIEW_DE_MORGAN_CONVERT_BUTT, false );
m_HToolBar->EnableTool( ID_LIBVIEW_DE_MORGAN_CONVERT_BUTT, false );
m_HToolBar->EnableTool( ID_LIBVIEW_DE_MORGAN_NORMAL_BUTT, false );
}
int jj = 1;
if( component )
......@@ -137,7 +148,7 @@ void WinEDA_ViewlibFrame::ReCreateHToolbar()
SelpartBox->Append( msg );
}
SelpartBox->SetSelection( m_unit - 1 );
SelpartBox->SetSelection( (m_unit > 0 ) ? m_unit - 1 : 0 );
SelpartBox->Enable( component && component->HasConversion() );
m_HToolBar->EnableTool( ID_LIBVIEW_VIEWDOC,
......
......@@ -458,8 +458,8 @@ void WinEDA_ViewlibFrame::ClickOnCmpList( wxCommandEvent& event )
{
m_entryName = name;
DisplayLibInfos();
m_unit = 0;
m_convert = 0;
m_unit = 1;
m_convert = 1;
Zoom_Automatique( false );
ReCreateHToolbar();
DrawPanel->Refresh();
......
No preview for this file type
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -510,9 +510,9 @@ void WinEDA_PcbFrame::createPopupMenuForTracks( TRACK* Track, wxMenu* PopMenu )
ADD_MENUITEM( track_mnu, ID_POPUP_PCB_EDIT_ALL_VIAS_AND_TRACK_SIZE,
_( "Set ALL Tracks and Vias to NetClass Values" ), width_track_via_xpm );
ADD_MENUITEM( track_mnu, ID_POPUP_PCB_EDIT_ALL_VIAS_SIZE,
_( "Set ALL Vias (No Track)to NetClass Values" ), width_vias_xpm );
_( "Set ALL Vias (No Track) to NetClass Values" ), width_vias_xpm );
ADD_MENUITEM( track_mnu, ID_POPUP_PCB_EDIT_ALL_TRACK_SIZE,
_( "Set ALL Tracks (No Via)to NetClass Values" ), width_track_xpm );
_( "Set ALL Tracks (No Via) to NetClass Values" ), width_track_xpm );
}
// Delete control:
......
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