Commit f0a52644 authored by jean-pierre charras's avatar jean-pierre charras
Browse files

Pcbnew: fix Bug #1413701 (Segfault on highlight "unconnected" net 0 in Pcbnew...

Pcbnew: fix Bug #1413701 (Segfault on highlight "unconnected" net 0 in Pcbnew ). Also, remove now useless code and other very minor fixes.
parent ca065833
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line Diff line number Diff line
@@ -88,8 +88,7 @@ void VRML2_MODEL_PARSER::Load( const wxString& aFilename, double aVrmlunits_to_3


    glScalef( matScale.x, matScale.y, matScale.z );
    glScalef( matScale.x, matScale.y, matScale.z );


    // Switch the locale to standard C (needed to print floating point numbers like 1.3)
    LOCALE_IO toggle;   // Temporary switch the locale to standard C to r/w floats
    SetLocaleTo_C_standard();


    childs.clear();
    childs.clear();


@@ -117,7 +116,6 @@ void VRML2_MODEL_PARSER::Load( const wxString& aFilename, double aVrmlunits_to_3
    }
    }


    fclose( m_file );
    fclose( m_file );
    SetLocaleTo_Default();       // revert to the current locale




    // DBG( printf( "chils size:%lu\n", childs.size() ) );
    // DBG( printf( "chils size:%lu\n", childs.size() ) );
+2 −3
Original line number Original line Diff line number Diff line
@@ -37,6 +37,7 @@
#include <layers_id_colors_and_visibility.h>
#include <layers_id_colors_and_visibility.h>
#include <potracelib.h>
#include <potracelib.h>
#include <auxiliary.h>
#include <auxiliary.h>
#include <common.h>


#include <bitmap2component.h>
#include <bitmap2component.h>


@@ -437,7 +438,7 @@ void BITMAPCONV_INFO::CreateOutputFile( BMP2CMP_MOD_LAYER aModLayer )


    potrace_dpoint_t( *c )[3];
    potrace_dpoint_t( *c )[3];


    setlocale( LC_NUMERIC, "C" );    // Switch the locale to standard C
    LOCALE_IO toggle;   // Temporary switch the locale to standard C to r/w floats


    // The layer name has meaning only for .kicad_mod files.
    // The layer name has meaning only for .kicad_mod files.
    // For these files the header creates 2 invisible texts: value and ref
    // For these files the header creates 2 invisible texts: value and ref
@@ -530,8 +531,6 @@ void BITMAPCONV_INFO::CreateOutputFile( BMP2CMP_MOD_LAYER aModLayer )
    }
    }


    OuputFileEnd();
    OuputFileEnd();

    setlocale( LC_NUMERIC, "" );      // revert to the current locale
}
}




+1 −1
Original line number Original line Diff line number Diff line
@@ -65,7 +65,7 @@ void GRID_TRICKS::getSelectedArea()
    wxArrayInt  cols = m_grid->GetSelectedCols();
    wxArrayInt  cols = m_grid->GetSelectedCols();
    wxArrayInt  rows = m_grid->GetSelectedRows();
    wxArrayInt  rows = m_grid->GetSelectedRows();


    DBG(printf("topLeft.Count():%zd botRight:Count():%zd\n", topLeft.Count(), botRight.Count() );)
    DBG(printf("topLeft.Count():%d botRight:Count():%d\n", int( topLeft.Count() ), int( botRight.Count() ) );)


    if( topLeft.Count() && botRight.Count() )
    if( topLeft.Count() && botRight.Count() )
    {
    {
+0 −5
Original line number Original line Diff line number Diff line
@@ -269,11 +269,6 @@ void GERBVIEW_FRAME::LoadSettings( wxConfigBase* aCfg )
    aCfg->SetPath( wxT( "drl_files" ) );
    aCfg->SetPath( wxT( "drl_files" ) );
    m_drillFileHistory.Load( *aCfg );
    m_drillFileHistory.Load( *aCfg );
    aCfg->SetPath( wxT( ".." ) );
    aCfg->SetPath( wxT( ".." ) );

    // WxWidgets 2.9.1 seems call setlocale( LC_NUMERIC, "" )
    // when reading doubles in config,
    // but forget to back to current locale. So we call SetLocaleTo_Default
    SetLocaleTo_Default();
}
}




+0 −5
Original line number Original line Diff line number Diff line
@@ -767,11 +767,6 @@ void PCB_BASE_FRAME::LoadSettings( wxConfigBase* aCfg )


    if( m_DisplayOptions.m_DisplayModText < LINE || m_DisplayOptions.m_DisplayModText > SKETCH )
    if( m_DisplayOptions.m_DisplayModText < LINE || m_DisplayOptions.m_DisplayModText > SKETCH )
        m_DisplayOptions.m_DisplayModText = FILLED;
        m_DisplayOptions.m_DisplayModText = FILLED;

    // WxWidgets 2.9.1 seems call setlocale( LC_NUMERIC, "" )
    // when reading doubles in config,
    // but forget to back to current locale. So we call SetLocaleTo_Default
    SetLocaleTo_Default( );
}
}




Loading