diff --git a/eeschema/dialogs/dialog_sim_model.cpp b/eeschema/dialogs/dialog_sim_model.cpp index 7cf21c6c76..c0c8f691e8 100644 --- a/eeschema/dialogs/dialog_sim_model.cpp +++ b/eeschema/dialogs/dialog_sim_model.cpp @@ -629,12 +629,10 @@ wxString DIALOG_SIM_MODEL::getSymbolPinString( int symbolPinNumber ) const if( symbolPin ) name = symbolPin->GetShownName(); - LOCALE_IO toggle; - if( name.IsEmpty() ) return wxString::Format( "%d", symbolPinNumber ); else - return wxString::Format( "%d (%s)", symbolPinNumber, symbolPin->GetShownName() ); + return wxString::Format( "%d (%s)", symbolPinNumber, name ); } @@ -643,8 +641,6 @@ wxString DIALOG_SIM_MODEL::getModelPinString( int modelPinNumber ) const { const wxString& pinName = curModel().GetPin( modelPinNumber - 1 ).name; - LOCALE_IO toggle; - if( pinName.IsEmpty() ) return wxString::Format( "%d", modelPinNumber, pinName ); else diff --git a/eeschema/sim/sim_property.cpp b/eeschema/sim/sim_property.cpp index 07883f585d..8710836fda 100644 --- a/eeschema/sim/sim_property.cpp +++ b/eeschema/sim/sim_property.cpp @@ -118,7 +118,7 @@ void SIM_VALIDATOR::onKeyDown( wxKeyEvent& aEvent ) // and wxPropertyGrid::AddActionTrigger() don't work for it. So instead we translate it to an // (up or down) arrow key, which has proper handling (select next or previous property) defined // by the aforementioned functions. - + if( aEvent.GetKeyCode() == WXK_TAB ) { // However, before that, if this is the first or last property, we instead want to navigate @@ -150,7 +150,7 @@ void SIM_VALIDATOR::onKeyDown( wxKeyEvent& aEvent ) navigate( wxNavigationKeyEvent::IsBackward ); return; } - + if( isLast && !aEvent.ShiftDown() ) { navigate( wxNavigationKeyEvent::IsForward ); @@ -191,9 +191,11 @@ SIM_STRING_VALIDATOR::SIM_STRING_VALIDATOR( SIM_VALUE::TYPE aValueType, SIM_VALUE_GRAMMAR::NOTATION aNotation ) : SIM_VALIDATOR(), m_valueType( aValueType ), - m_notation( aNotation ) + m_notation( aNotation ), + m_prevInsertionPoint( 0 ) { wxTextEntry* textEntry = getTextEntry(); + if( !textEntry ) return; diff --git a/pcbnew/dialogs/dialog_net_inspector.cpp b/pcbnew/dialogs/dialog_net_inspector.cpp index 5cab21a996..7130f1604d 100644 --- a/pcbnew/dialogs/dialog_net_inspector.cpp +++ b/pcbnew/dialogs/dialog_net_inspector.cpp @@ -1569,7 +1569,11 @@ void DIALOG_NET_INSPECTOR::updateNet( NETINFO_ITEM* aNet ) unsigned int DIALOG_NET_INSPECTOR::calculateViaLength( const PCB_TRACK* aTrack ) const { - const PCB_VIA* via = dynamic_cast( aTrack ); + const PCB_VIA* via = dynamic_cast( aTrack ); + + if( !via ) + return 0; + BOARD_DESIGN_SETTINGS& bds = m_brd->GetDesignSettings(); // calculate the via length individually from the board stackup and via's start and end layer.