~andrew-plumb/kicad/kicad

« back to all changes in this revision

Viewing changes to common/fp_lib_table.cpp

  • Committer: Dick Hollenbeck
  • Date: 2013-10-03 22:12:56 UTC
  • Revision ID: dick@softplc.com-20131003221256-ny7xs3ucnjlj12j1
DIALOG_FP_LIB_TABLE does not use wxSplitterWindow, it would not obey.
Paste popup menu in this dialog now allows pasting a (fp_lib_table)
s-expression element holding (lib) elements.  This provides an 
opportunity for GITHUB library publishers to put the table description
into their README.md file as a (fp_lib_table) element where it can
be quickly copied to clipboard and pasted into the fp lib table dialog.
This is a paste operation, and overwrites from the initial cursor position.

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
}
51
51
 
52
52
 
 
53
/*
 
54
void FP_LIB_TABLE::Paste( const FP_LIB_TABLE& aOther, int aDestNdx )
 
55
{
 
56
    if( aDestNdx == -1 )
 
57
        aDestNdx = rows.size() - 1;
 
58
    else if( unsigned( aDestNdx ) >= rows.size() )
 
59
        return;     // bad caller.
 
60
    else
 
61
    {
 
62
 
 
63
        rows.assign( aOther.rows.begin(), aOther.rows.end() );
 
64
    }
 
65
}
 
66
*/
 
67
 
 
68
 
53
69
void FP_LIB_TABLE::Parse( FP_LIB_TABLE_LEXER* in ) throw( IO_ERROR, PARSE_ERROR )
54
70
{
55
71
    /*
142
158
                sawOpts = true;
143
159
                in->NeedSYMBOLorNUMBER();
144
160
                row.SetOptions( in->FromUTF8() );
145
 
 
146
 
                // create PROPERTIES* from options, set into the ROW
147
 
                row.properties = ParseOptions( in->CurStr() );
148
161
                break;
149
162
 
150
163
            case T_descr: