Commit c03abc0b authored by charras's avatar charras
Browse files

eeschema, libedit: fixed a bug than crashes libedit when using the delete tool, on a left click.

parent 4b2f33a9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -539,6 +539,7 @@ EDA_Rect& EDA_Rect::Inflate( int aDelta )
 */
{
    Inflate( aDelta, aDelta );
    return *this;
}

/**************************************************/
+5 −14
Original line number Diff line number Diff line
@@ -229,20 +229,11 @@ void DIALOG_CVPCB_CONFIG::OnAddOrInsertLibClick( wxCommandEvent& event )
         * because it preserve use of default libraries paths, when the path
         * is a sub path of these default paths
         */
        if( wxGetApp().GetLibraryPathList().Index( fn.GetPath() ) != wxNOT_FOUND )  // Ok, trivial case
            libfilename = fn.GetName();
        else                                                                        // not in the default, : see if this file is in a subpath:
        {
            libfilename = fn.GetPathWithSep() + fn.GetName();
            for( unsigned kk = 0; kk < wxGetApp().GetLibraryPathList().GetCount(); kk++ )
            {
                if( fn.MakeRelativeTo( wxGetApp().GetLibraryPathList()[kk] ) )
                {
                    libfilename = fn.GetPathWithSep() + fn.GetName();
                    break;
                }
            }
        }
        libfilename = wxGetApp().ReturnFilenameWithRelativePathInLibPath( fn.GetFullPath() );
        // Remove extension:
        fn = libfilename;
        fn.SetExt(wxEmptyString);
        libfilename = fn.GetFullPath();

        //Add or insert new library name, if not already in list
        if( list->FindString( libfilename, fn.IsCaseSensitive() ) == wxNOT_FOUND )

eeschema/annotate_dialog.rc

deleted100644 → 0
+0 −1
Original line number Diff line number Diff line
#include "wx/msw/wx.rc"
+1 −1
Original line number Diff line number Diff line
@@ -1247,7 +1247,7 @@ void LIB_SEGMENT::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC,
     * bounding box calculation. */
#if 0
    EDA_Rect bBox = GetBoundingBox();
    bBox.Inflate( m_Width + 2, m_Width + 2 );
    bBox.Inflate( m_Width + 2 );
    GRRect( &aPanel->m_ClipBox, aDC, bBox.GetOrigin().x, bBox.GetOrigin().y,
            bBox.GetEnd().x, bBox.GetEnd().y, 0, LIGHTMAGENTA );
#endif
+5 −14
Original line number Diff line number Diff line
@@ -242,20 +242,11 @@ void DIALOG_EESCHEMA_CONFIG::OnAddOrInsertLibClick( wxCommandEvent& event )
         * because it preserve use of default libraries paths, when the path
         * is a sub path of these default paths
         */
        if( wxGetApp().GetLibraryPathList().Index( fn.GetPath() ) != wxNOT_FOUND )  // Ok, trivial case
            libfilename = fn.GetName();
        else    // not in the default, : see if this file is in a subpath:
        {
            libfilename = fn.GetPathWithSep() + fn.GetName();
            for ( unsigned kk = 0; kk < wxGetApp().GetLibraryPathList().GetCount(); kk ++ )
            {
                if( fn.MakeRelativeTo(wxGetApp().GetLibraryPathList()[kk] ) )
                {
                    libfilename = fn.GetPathWithSep() + fn.GetName();
                    break;
                }
            }
        }
        libfilename = wxGetApp().ReturnFilenameWithRelativePathInLibPath( fn.GetFullPath() );
        // Remove extension:
        fn = libfilename;
        fn.SetExt(wxEmptyString);
        libfilename = fn.GetFullPath();

        //Add or insert new library name, if not already in list
        if( m_ListLibr->FindString( libfilename, fn.IsCaseSensitive() ) == wxNOT_FOUND )
Loading