fixed minor problem in Eeschema library viewer

This commit is contained in:
charras 2009-10-18 11:41:05 +00:00
parent 15e0734525
commit e4467d4d9a
5 changed files with 1840 additions and 1839 deletions

View File

@ -26,7 +26,7 @@ void WinEDA_ViewlibFrame::ReCreateHToolbar()
if( m_HToolBar == NULL ) if( m_HToolBar == NULL )
{ {
m_HToolBar = new WinEDA_Toolbar( TOOLBAR_MAIN, this, ID_H_TOOLBAR, m_HToolBar = new WinEDA_Toolbar( TOOLBAR_MAIN, this, ID_H_TOOLBAR,
TRUE ); true );
SetToolBar( m_HToolBar ); SetToolBar( m_HToolBar );
// Set up toolbar // Set up toolbar
@ -86,7 +86,7 @@ void WinEDA_ViewlibFrame::ReCreateHToolbar()
m_HToolBar->AddTool( ID_LIBVIEW_VIEWDOC, wxEmptyString, m_HToolBar->AddTool( ID_LIBVIEW_VIEWDOC, wxEmptyString,
wxBitmap( datasheet_xpm ), wxBitmap( datasheet_xpm ),
_( "View component documents" ) ); _( "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 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(): // Must be AFTER Realize():
if( asdeMorgan )
{
m_HToolBar->ToggleTool( ID_LIBVIEW_DE_MORGAN_NORMAL_BUTT, m_HToolBar->ToggleTool( ID_LIBVIEW_DE_MORGAN_NORMAL_BUTT,
(m_convert <= 1) ? TRUE : FALSE ); (m_convert <= 1) ? true : false );
m_HToolBar->ToggleTool( ID_LIBVIEW_DE_MORGAN_CONVERT_BUTT, m_HToolBar->ToggleTool( ID_LIBVIEW_DE_MORGAN_CONVERT_BUTT,
(m_convert >= 2) ? TRUE : FALSE ); (m_convert >= 2) ? true : false );
m_HToolBar->EnableTool( ID_LIBVIEW_DE_MORGAN_CONVERT_BUTT, asdeMorgan ); m_HToolBar->EnableTool( ID_LIBVIEW_DE_MORGAN_CONVERT_BUTT, true );
m_HToolBar->EnableTool( ID_LIBVIEW_DE_MORGAN_NORMAL_BUTT, asdeMorgan ); 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; int jj = 1;
if( component ) if( component )
@ -137,7 +148,7 @@ void WinEDA_ViewlibFrame::ReCreateHToolbar()
SelpartBox->Append( msg ); SelpartBox->Append( msg );
} }
SelpartBox->SetSelection( m_unit - 1 ); SelpartBox->SetSelection( (m_unit > 0 ) ? m_unit - 1 : 0 );
SelpartBox->Enable( component && component->HasConversion() ); SelpartBox->Enable( component && component->HasConversion() );
m_HToolBar->EnableTool( ID_LIBVIEW_VIEWDOC, m_HToolBar->EnableTool( ID_LIBVIEW_VIEWDOC,

View File

@ -458,8 +458,8 @@ void WinEDA_ViewlibFrame::ClickOnCmpList( wxCommandEvent& event )
{ {
m_entryName = name; m_entryName = name;
DisplayLibInfos(); DisplayLibInfos();
m_unit = 0; m_unit = 1;
m_convert = 0; m_convert = 1;
Zoom_Automatique( false ); Zoom_Automatique( false );
ReCreateHToolbar(); ReCreateHToolbar();
DrawPanel->Refresh(); DrawPanel->Refresh();

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -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, 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 ); _( "Set ALL Tracks and Vias to NetClass Values" ), width_track_via_xpm );
ADD_MENUITEM( track_mnu, ID_POPUP_PCB_EDIT_ALL_VIAS_SIZE, 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, 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: // Delete control: