Fix botched merge.
This commit is contained in:
parent
0de2fb8a67
commit
ce55dd2893
|
@ -914,6 +914,7 @@ LIB_SHAPE* SCH_SEXPR_PARSER::parseArc()
|
||||||
wxPoint pos;
|
wxPoint pos;
|
||||||
int startAngle;
|
int startAngle;
|
||||||
int endAngle;
|
int endAngle;
|
||||||
|
STROKE_PARAMS stroke( Mils2iu( DEFAULT_LINE_WIDTH_MILS ), PLOT_DASH_TYPE::DEFAULT );
|
||||||
FILL_PARAMS fill;
|
FILL_PARAMS fill;
|
||||||
bool hasMidPoint = false;
|
bool hasMidPoint = false;
|
||||||
bool hasAngles = false;
|
bool hasAngles = false;
|
||||||
|
@ -979,22 +980,15 @@ LIB_SHAPE* SCH_SEXPR_PARSER::parseArc()
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Expecting( "at, length, or angle" );
|
Expecting( "at, length, or angles" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case T_stroke:
|
case T_stroke:
|
||||||
NeedLEFT();
|
parseStroke( stroke );
|
||||||
token = NextTok();
|
arc->SetWidth( stroke.GetWidth() );
|
||||||
|
|
||||||
if( token != T_width )
|
|
||||||
Expecting( "width" );
|
|
||||||
|
|
||||||
arc->SetWidth( parseInternalUnits( "stroke width" ) );
|
|
||||||
NeedRIGHT(); // Closes width token;
|
|
||||||
NeedRIGHT(); // Closes stroke token;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case T_fill:
|
case T_fill:
|
||||||
|
@ -1048,6 +1042,7 @@ LIB_SHAPE* SCH_SEXPR_PARSER::parseBezier()
|
||||||
wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as a bezier." ) );
|
wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as a bezier." ) );
|
||||||
|
|
||||||
T token;
|
T token;
|
||||||
|
STROKE_PARAMS stroke( Mils2iu( DEFAULT_LINE_WIDTH_MILS ), PLOT_DASH_TYPE::DEFAULT );
|
||||||
FILL_PARAMS fill;
|
FILL_PARAMS fill;
|
||||||
std::unique_ptr<LIB_SHAPE> bezier = std::make_unique<LIB_SHAPE>( nullptr, SHAPE_T::BEZIER );
|
std::unique_ptr<LIB_SHAPE> bezier = std::make_unique<LIB_SHAPE>( nullptr, SHAPE_T::BEZIER );
|
||||||
|
|
||||||
|
@ -1082,15 +1077,8 @@ LIB_SHAPE* SCH_SEXPR_PARSER::parseBezier()
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case T_stroke:
|
case T_stroke:
|
||||||
NeedLEFT();
|
parseStroke( stroke );
|
||||||
token = NextTok();
|
bezier->SetWidth( stroke.GetWidth() );
|
||||||
|
|
||||||
if( token != T_width )
|
|
||||||
Expecting( "width" );
|
|
||||||
|
|
||||||
bezier->SetWidth( parseInternalUnits( "stroke width" ) );
|
|
||||||
NeedRIGHT(); // Closes width token;
|
|
||||||
NeedRIGHT(); // Closes stroke token;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case T_fill:
|
case T_fill:
|
||||||
|
@ -1115,6 +1103,7 @@ LIB_SHAPE* SCH_SEXPR_PARSER::parseCircle()
|
||||||
T token;
|
T token;
|
||||||
wxPoint center;
|
wxPoint center;
|
||||||
int radius;
|
int radius;
|
||||||
|
STROKE_PARAMS stroke( Mils2iu( DEFAULT_LINE_WIDTH_MILS ), PLOT_DASH_TYPE::DEFAULT );
|
||||||
FILL_PARAMS fill;
|
FILL_PARAMS fill;
|
||||||
std::unique_ptr<LIB_SHAPE> circle = std::make_unique<LIB_SHAPE>( nullptr, SHAPE_T::CIRCLE );
|
std::unique_ptr<LIB_SHAPE> circle = std::make_unique<LIB_SHAPE>( nullptr, SHAPE_T::CIRCLE );
|
||||||
|
|
||||||
|
@ -1141,15 +1130,8 @@ LIB_SHAPE* SCH_SEXPR_PARSER::parseCircle()
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case T_stroke:
|
case T_stroke:
|
||||||
NeedLEFT();
|
parseStroke( stroke );
|
||||||
token = NextTok();
|
circle->SetWidth( stroke.GetWidth() );
|
||||||
|
|
||||||
if( token != T_width )
|
|
||||||
Expecting( "width" );
|
|
||||||
|
|
||||||
circle->SetWidth( parseInternalUnits( "stroke width" ) );
|
|
||||||
NeedRIGHT(); // Closes width token;
|
|
||||||
NeedRIGHT(); // Closes stroke token;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case T_fill:
|
case T_fill:
|
||||||
|
@ -1398,6 +1380,7 @@ LIB_SHAPE* SCH_SEXPR_PARSER::parsePolyLine()
|
||||||
wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as a poly." ) );
|
wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as a poly." ) );
|
||||||
|
|
||||||
T token;
|
T token;
|
||||||
|
STROKE_PARAMS stroke( Mils2iu( DEFAULT_LINE_WIDTH_MILS ), PLOT_DASH_TYPE::DEFAULT );
|
||||||
FILL_PARAMS fill;
|
FILL_PARAMS fill;
|
||||||
std::unique_ptr<LIB_SHAPE> poly = std::make_unique<LIB_SHAPE>( nullptr, SHAPE_T::POLY );
|
std::unique_ptr<LIB_SHAPE> poly = std::make_unique<LIB_SHAPE>( nullptr, SHAPE_T::POLY );
|
||||||
|
|
||||||
|
@ -1432,15 +1415,8 @@ LIB_SHAPE* SCH_SEXPR_PARSER::parsePolyLine()
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case T_stroke:
|
case T_stroke:
|
||||||
NeedLEFT();
|
parseStroke( stroke );
|
||||||
token = NextTok();
|
poly->SetWidth( stroke.GetWidth() );
|
||||||
|
|
||||||
if( token != T_width )
|
|
||||||
Expecting( "width" );
|
|
||||||
|
|
||||||
poly->SetWidth( parseInternalUnits( "stroke width" ) );
|
|
||||||
NeedRIGHT(); // Closes width token;
|
|
||||||
NeedRIGHT(); // Closes stroke token;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case T_fill:
|
case T_fill:
|
||||||
|
@ -1463,6 +1439,7 @@ LIB_SHAPE* SCH_SEXPR_PARSER::parseRectangle()
|
||||||
wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as a rectangle." ) );
|
wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as a rectangle." ) );
|
||||||
|
|
||||||
T token;
|
T token;
|
||||||
|
STROKE_PARAMS stroke( Mils2iu( DEFAULT_LINE_WIDTH_MILS ), PLOT_DASH_TYPE::DEFAULT );
|
||||||
FILL_PARAMS fill;
|
FILL_PARAMS fill;
|
||||||
std::unique_ptr<LIB_SHAPE> rectangle = std::make_unique<LIB_SHAPE>( nullptr, SHAPE_T::RECT );
|
std::unique_ptr<LIB_SHAPE> rectangle = std::make_unique<LIB_SHAPE>( nullptr, SHAPE_T::RECT );
|
||||||
|
|
||||||
|
@ -1489,15 +1466,8 @@ LIB_SHAPE* SCH_SEXPR_PARSER::parseRectangle()
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case T_stroke:
|
case T_stroke:
|
||||||
NeedLEFT();
|
parseStroke( stroke );
|
||||||
token = NextTok();
|
rectangle->SetWidth( stroke.GetWidth() );
|
||||||
|
|
||||||
if( token != T_width )
|
|
||||||
Expecting( "width" );
|
|
||||||
|
|
||||||
rectangle->SetWidth( parseInternalUnits( "stroke width" ) );
|
|
||||||
NeedRIGHT(); // Closes width token;
|
|
||||||
NeedRIGHT(); // Closes stroke token;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case T_fill:
|
case T_fill:
|
||||||
|
@ -2547,7 +2517,7 @@ SCH_SHEET* SCH_SEXPR_PARSER::parseSheet()
|
||||||
wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as a sheet." ) );
|
wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as a sheet." ) );
|
||||||
|
|
||||||
T token;
|
T token;
|
||||||
STROKE_PARAMS stroke;
|
STROKE_PARAMS stroke( Mils2iu( DEFAULT_LINE_WIDTH_MILS ), PLOT_DASH_TYPE::DEFAULT );
|
||||||
FILL_PARAMS fill;
|
FILL_PARAMS fill;
|
||||||
SCH_FIELD* field;
|
SCH_FIELD* field;
|
||||||
std::vector<SCH_FIELD> fields;
|
std::vector<SCH_FIELD> fields;
|
||||||
|
@ -2741,7 +2711,7 @@ SCH_BUS_WIRE_ENTRY* SCH_SEXPR_PARSER::parseBusEntry()
|
||||||
wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as a bus entry." ) );
|
wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as a bus entry." ) );
|
||||||
|
|
||||||
T token;
|
T token;
|
||||||
STROKE_PARAMS stroke;
|
STROKE_PARAMS stroke( Mils2iu( DEFAULT_LINE_WIDTH_MILS ), PLOT_DASH_TYPE::DEFAULT );
|
||||||
std::unique_ptr<SCH_BUS_WIRE_ENTRY> busEntry = std::make_unique<SCH_BUS_WIRE_ENTRY>();
|
std::unique_ptr<SCH_BUS_WIRE_ENTRY> busEntry = std::make_unique<SCH_BUS_WIRE_ENTRY>();
|
||||||
|
|
||||||
for( token = NextTok(); token != T_RIGHT; token = NextTok() )
|
for( token = NextTok(); token != T_RIGHT; token = NextTok() )
|
||||||
|
@ -2792,7 +2762,7 @@ SCH_BUS_WIRE_ENTRY* SCH_SEXPR_PARSER::parseBusEntry()
|
||||||
SCH_LINE* SCH_SEXPR_PARSER::parseLine()
|
SCH_LINE* SCH_SEXPR_PARSER::parseLine()
|
||||||
{
|
{
|
||||||
T token;
|
T token;
|
||||||
STROKE_PARAMS stroke;
|
STROKE_PARAMS stroke( Mils2iu( DEFAULT_LINE_WIDTH_MILS ), PLOT_DASH_TYPE::DEFAULT );
|
||||||
std::unique_ptr<SCH_LINE> line = std::make_unique<SCH_LINE>();
|
std::unique_ptr<SCH_LINE> line = std::make_unique<SCH_LINE>();
|
||||||
|
|
||||||
switch( CurTok() )
|
switch( CurTok() )
|
||||||
|
|
Loading…
Reference in New Issue