Commit 80693fa7 authored by Dick Hollenbeck's avatar Dick Hollenbeck
Browse files

add dialog for fp_lib_table

parents b1ea9d0e ae19bbfa
Loading
Loading
Loading
Loading
+1 −5
Original line number Original line Diff line number Diff line
@@ -294,11 +294,7 @@ bool FP_LIB_TABLE::InsertRow( const ROW& aRow, bool doReplace )


    if( doReplace )
    if( doReplace )
    {
    {
        int ndx = it->second;
        rows[it->second] = aRow;

        rows[ndx] = aRow;
        nickIndex.erase( aRow.nickName );
        nickIndex.insert( INDEX_VALUE( aRow.nickName, ndx ) );
        return true;
        return true;
    }
    }


+3 −6
Original line number Original line Diff line number Diff line
@@ -27,9 +27,6 @@
#define DLIST_H_
#define DLIST_H_




#include <stdio.h>          // NULL definition.


class EDA_ITEM;
class EDA_ITEM;




@@ -216,20 +213,20 @@ public:


    //-----< STL like functions >---------------------------------------
    //-----< STL like functions >---------------------------------------
    T* begin() const { return GetFirst(); }
    T* begin() const { return GetFirst(); }
    T* end() const { return NULL; }
    T* end() const { return 0; }


    T* PopFront()
    T* PopFront()
    {
    {
        if( GetFirst() )
        if( GetFirst() )
            return Remove( GetFirst() );
            return Remove( GetFirst() );
        return NULL;
        return 0;
    }
    }


    T* PopBack()
    T* PopBack()
    {
    {
        if( GetLast() )
        if( GetLast() )
            return Remove( GetLast() );
            return Remove( GetLast() );
        return NULL;
        return 0;
    }
    }


    /**
    /**
+11 −6
Original line number Original line Diff line number Diff line
@@ -36,9 +36,8 @@




class OUTPUTFORMATTER;
class OUTPUTFORMATTER;


class MODULE;
class MODULE;
class FP_LIB_TABLE_LEXER;


/**
/**
 * Class FP_LIB_TABLE
 * Class FP_LIB_TABLE
@@ -279,7 +278,6 @@ public:
     */
     */
    std::vector<wxString> GetLogicalLibs();
    std::vector<wxString> GetLogicalLibs();



    //-----<wxGridTableBase overloads>-------------------------------------------
    //-----<wxGridTableBase overloads>-------------------------------------------


    int         GetNumberRows () { return rows.size(); }
    int         GetNumberRows () { return rows.size(); }
@@ -318,11 +316,18 @@ public:


            switch( aCol )
            switch( aCol )
            {
            {
            case 1:     return r.SetType( aValue  );
            case 1:     r.SetType( aValue  );
            case 2:     return r.SetFullURI( aValue );
            case 2:     r.SetFullURI( aValue );
            case 3:     return r.SetOptions( aValue );
            case 3:     r.SetOptions( aValue );
            }
        }
        }
    }
    }

    bool IsEmptyCell( int aRow, int aCol )
    {
        if( unsigned( aRow ) < rows.size() )
            return false;
        return true;
    }
    }


    //-----</wxGridTableBase overloads>------------------------------------------
    //-----</wxGridTableBase overloads>------------------------------------------
+15 −3
Original line number Original line Diff line number Diff line
@@ -26,8 +26,8 @@
 * @file wxPcbStruct.h
 * @file wxPcbStruct.h
 */
 */


#ifndef  WXPCB_STRUCT_H
#ifndef  WXPCB_STRUCT_H_
#define  WXPCB_STRUCT_H
#define  WXPCB_STRUCT_H_




#include <wxBasePcbFrame.h>
#include <wxBasePcbFrame.h>
@@ -1604,4 +1604,16 @@ public:
};
};




#endif  /* WXPCB_STRUCT_H */
class FP_LIB_TABLE;

/**
 * Function InvokePcbLibTableEditor
 * shows the modal DIALOG_FP_LIB_TABLE for purposes of editing two lib tables.
 *
 * @return int - bits 0 and 1 tell whether a change was made to the @a aGlobal
 *  and/or the @a aProject table, respectively.  If set, table was modified.
 */
int InvokePcbLibTableEditor( wxFrame* aParent, FP_LIB_TABLE* aGlobal, FP_LIB_TABLE* aProject );


#endif  // WXPCB_STRUCT_H_
+32 −30
Original line number Original line Diff line number Diff line
@@ -50,6 +50,8 @@ set(PCBNEW_DIALOGS
    dialogs/dialog_export_3Dfiles_base.cpp
    dialogs/dialog_export_3Dfiles_base.cpp
    dialogs/dialog_find_base.cpp
    dialogs/dialog_find_base.cpp
    dialogs/dialog_find.cpp
    dialogs/dialog_find.cpp
    dialogs/dialog_fp_lib_table_base.cpp
    dialogs/dialog_fp_lib_table.cpp
    dialogs/dialog_freeroute_exchange.cpp
    dialogs/dialog_freeroute_exchange.cpp
    dialogs/dialog_freeroute_exchange_base.cpp
    dialogs/dialog_freeroute_exchange_base.cpp
    dialogs/dialog_gendrill.cpp
    dialogs/dialog_gendrill.cpp
Loading