From b3e7510d314805d4a3c3cf780d9308ae12fda19d Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Thu, 15 Dec 2011 10:48:36 -0600 Subject: [PATCH] plugin testing has started --- pcbnew/kicad_plugin.cpp | 19 ++++++++++++------- pcbnew/kicad_plugin.h | 2 +- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index 0cbe2c8fea..4a81cad5a3 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -1737,13 +1737,18 @@ void KICAD_PLUGIN::loadPCB_TEXT() GRTextHorizJustifyType hj; - switch( *hJustify ) + if( hJustify ) { - default: - case 'C': hj = GR_TEXT_HJUSTIFY_CENTER; break; - case 'L': hj = GR_TEXT_HJUSTIFY_LEFT; break; - case 'R': hj = GR_TEXT_HJUSTIFY_RIGHT; break; + switch( *hJustify ) + { + default: + case 'C': hj = GR_TEXT_HJUSTIFY_CENTER; break; + case 'L': hj = GR_TEXT_HJUSTIFY_LEFT; break; + case 'R': hj = GR_TEXT_HJUSTIFY_RIGHT; break; + } } + else + hj = GR_TEXT_HJUSTIFY_CENTER; pcbtxt->SetHorizJustify( hj ); @@ -2204,7 +2209,7 @@ void KICAD_PLUGIN::loadDIMENSION() const char* data; char* line = m_reader->Line(); - if( TESTLINE( "$EndDIMENSION" ) ) + if( TESTLINE( "$endCOTATION" ) ) { m_board->Add( dim.release(), ADD_APPEND ); return; // preferred exit @@ -2387,7 +2392,7 @@ void KICAD_PLUGIN::loadDIMENSION() } } - THROW_IO_ERROR( "Missing '$EndDIMENSION'" ); + THROW_IO_ERROR( "Missing '$endCOTATION'" ); } diff --git a/pcbnew/kicad_plugin.h b/pcbnew/kicad_plugin.h index f1fbf8a82a..087c0c7bc5 100644 --- a/pcbnew/kicad_plugin.h +++ b/pcbnew/kicad_plugin.h @@ -104,7 +104,7 @@ protected: /** * Function degParse - * parses an ASCII decimal floating point value which is certainy an angle. This + * parses an ASCII decimal floating point value which is certainly an angle. This * is a dedicated function for encapsulating support for the migration from * tenths of degrees to degrees in floating point. This function is the complement of * fmtDEG(). One has to know what the other is doing.