LibEdit: automatic selection of option "edit Pin per Pin" when load/editing a component:
default is Edit pin per pin for components with parts locked and coupling pin for others.
This commit is contained in:
parent
83e8b961c7
commit
288684101a
|
@ -14,6 +14,7 @@
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
#include "libeditframe.h"
|
#include "libeditframe.h"
|
||||||
#include "class_library.h"
|
#include "class_library.h"
|
||||||
|
#include "eeschema_id.h"
|
||||||
|
|
||||||
|
|
||||||
/* Dialog box to edit a libentry (a component in library) properties */
|
/* Dialog box to edit a libentry (a component in library) properties */
|
||||||
|
@ -31,7 +32,16 @@
|
||||||
|
|
||||||
void WinEDA_LibeditFrame::OnEditComponentProperties( wxCommandEvent& event )
|
void WinEDA_LibeditFrame::OnEditComponentProperties( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
|
bool partLocked = GetComponent()->m_UnitSelectionLocked;
|
||||||
EditComponentProperties();
|
EditComponentProperties();
|
||||||
|
if( partLocked != GetComponent()->m_UnitSelectionLocked )
|
||||||
|
{ // g_EditPinByPinIsOn is set to the better value,
|
||||||
|
// if m_UnitSelectionLocked has changed
|
||||||
|
g_EditPinByPinIsOn = GetComponent()->m_UnitSelectionLocked ? true : false;
|
||||||
|
m_HToolBar->ToggleTool( ID_LIBEDIT_EDIT_PIN_BY_PIN, g_EditPinByPinIsOn );
|
||||||
|
}
|
||||||
|
|
||||||
|
m_HToolBar->Refresh();
|
||||||
DrawPanel->Refresh();
|
DrawPanel->Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -106,11 +106,14 @@ library \"%s\"." ),
|
||||||
if( !LoadOneLibraryPartAux( LibEntry, m_library ) )
|
if( !LoadOneLibraryPartAux( LibEntry, m_library ) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
g_EditPinByPinIsOn = false;
|
g_EditPinByPinIsOn = m_component->m_UnitSelectionLocked ? true : false;
|
||||||
|
m_HToolBar->ToggleTool( ID_LIBEDIT_EDIT_PIN_BY_PIN, g_EditPinByPinIsOn );
|
||||||
|
|
||||||
GetScreen()->ClearUndoRedoList();
|
GetScreen()->ClearUndoRedoList();
|
||||||
Zoom_Automatique( false );
|
Zoom_Automatique( false );
|
||||||
DrawPanel->Refresh();
|
DrawPanel->Refresh();
|
||||||
SetShowDeMorgan(m_component->HasConversion() );
|
SetShowDeMorgan(m_component->HasConversion() );
|
||||||
|
m_HToolBar->Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -558,11 +561,13 @@ created. Aborted" ) );
|
||||||
DisplayCmpDoc();
|
DisplayCmpDoc();
|
||||||
UpdateAliasSelectList();
|
UpdateAliasSelectList();
|
||||||
UpdatePartSelectList();
|
UpdatePartSelectList();
|
||||||
g_EditPinByPinIsOn = false;
|
g_EditPinByPinIsOn = m_component->m_UnitSelectionLocked ? true : false;
|
||||||
|
m_HToolBar->ToggleTool( ID_LIBEDIT_EDIT_PIN_BY_PIN, g_EditPinByPinIsOn );
|
||||||
m_lastDrawItem = NULL;
|
m_lastDrawItem = NULL;
|
||||||
GetScreen()->ClearUndoRedoList();
|
GetScreen()->ClearUndoRedoList();
|
||||||
OnModify( );
|
OnModify( );
|
||||||
DrawPanel->Refresh();
|
DrawPanel->Refresh();
|
||||||
|
m_HToolBar->Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -667,7 +667,7 @@ void WinEDA_LibeditFrame::Process_Special_Functions( wxCommandEvent& event )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_LIBEDIT_EDIT_PIN_BY_PIN:
|
case ID_LIBEDIT_EDIT_PIN_BY_PIN:
|
||||||
g_EditPinByPinIsOn = g_EditPinByPinIsOn ? false : true;
|
g_EditPinByPinIsOn = m_HToolBar->GetToolState(ID_LIBEDIT_EDIT_PIN_BY_PIN);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_LIBEDIT_PIN_BUTT:
|
case ID_LIBEDIT_PIN_BUTT:
|
||||||
|
|
|
@ -200,9 +200,14 @@ void WinEDA_LibeditFrame::ReCreateHToolbar()
|
||||||
m_HToolBar->AddControl( m_SelAliasBox );
|
m_HToolBar->AddControl( m_SelAliasBox );
|
||||||
|
|
||||||
m_HToolBar->AddSeparator();
|
m_HToolBar->AddSeparator();
|
||||||
|
msg = _( "Edit pins part per part ( Use carefully!)" );
|
||||||
|
msg << wxT("\n");
|
||||||
|
msg += _("Usual option = OFF when parts are not locked");
|
||||||
|
msg << wxT("\n");
|
||||||
|
msg += _("Usual option = ON when parts are locked");
|
||||||
m_HToolBar->AddTool( ID_LIBEDIT_EDIT_PIN_BY_PIN, wxEmptyString,
|
m_HToolBar->AddTool( ID_LIBEDIT_EDIT_PIN_BY_PIN, wxEmptyString,
|
||||||
wxBitmap( pin2pin_xpm ),
|
wxBitmap( pin2pin_xpm ),
|
||||||
_( "Edit pins part per part ( Use carefully!)" ),
|
msg,
|
||||||
wxITEM_CHECK );
|
wxITEM_CHECK );
|
||||||
|
|
||||||
// after adding the buttons to the toolbar, must call Realize() to reflect
|
// after adding the buttons to the toolbar, must call Realize() to reflect
|
||||||
|
|
Binary file not shown.
2199
internat/de/kicad.po
2199
internat/de/kicad.po
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue