Browse Source

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.
pull/1/head
charras 16 years ago
parent
commit
288684101a
  1. 10
      eeschema/edit_component_in_lib.cpp
  2. 9
      eeschema/libedit.cpp
  3. 2
      eeschema/libeditframe.cpp
  4. 7
      eeschema/tool_lib.cpp
  5. BIN
      internat/de/kicad.mo
  6. 2473
      internat/de/kicad.po
  7. BIN
      internat/fr/kicad.mo
  8. 402
      internat/fr/kicad.po

10
eeschema/edit_component_in_lib.cpp

@ -14,6 +14,7 @@
#include "protos.h"
#include "libeditframe.h"
#include "class_library.h"
#include "eeschema_id.h"
/* Dialog box to edit a libentry (a component in library) properties */
@ -31,7 +32,16 @@
void WinEDA_LibeditFrame::OnEditComponentProperties( wxCommandEvent& event )
{
bool partLocked = GetComponent()->m_UnitSelectionLocked;
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();
}

9
eeschema/libedit.cpp

@ -106,11 +106,14 @@ library \"%s\"." ),
if( !LoadOneLibraryPartAux( LibEntry, m_library ) )
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();
Zoom_Automatique( false );
DrawPanel->Refresh();
SetShowDeMorgan(m_component->HasConversion() );
m_HToolBar->Refresh();
}
@ -558,11 +561,13 @@ created. Aborted" ) );
DisplayCmpDoc();
UpdateAliasSelectList();
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;
GetScreen()->ClearUndoRedoList();
OnModify( );
DrawPanel->Refresh();
m_HToolBar->Refresh();
}

2
eeschema/libeditframe.cpp

@ -667,7 +667,7 @@ void WinEDA_LibeditFrame::Process_Special_Functions( wxCommandEvent& event )
break;
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;
case ID_LIBEDIT_PIN_BUTT:

7
eeschema/tool_lib.cpp

@ -200,9 +200,14 @@ void WinEDA_LibeditFrame::ReCreateHToolbar()
m_HToolBar->AddControl( m_SelAliasBox );
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,
wxBitmap( pin2pin_xpm ),
_( "Edit pins part per part ( Use carefully!)" ),
msg,
wxITEM_CHECK );
// after adding the buttons to the toolbar, must call Realize() to reflect

BIN
internat/de/kicad.mo

2473
internat/de/kicad.po
File diff suppressed because it is too large
View File

BIN
internat/fr/kicad.mo

402
internat/fr/kicad.po
File diff suppressed because it is too large
View File

Loading…
Cancel
Save