Add comments and a comment asking to fix a call to a GUI inside a io plugin, that is not allowed

This commit is contained in:
jean-pierre charras 2017-09-27 18:56:06 +02:00
parent b4a59eb96d
commit df830dab4c
1 changed files with 10 additions and 7 deletions

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2012 CERN
* Copyright (C) 2012-2016 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2012-2017 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -2820,15 +2820,16 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER()
NeedRIGHT();
break;
case T_layer:
case T_layer: // keyword for zones that are on only one layer
zone->SetLayer( parseBoardItemLayer() );
NeedRIGHT();
break;
case T_layers:
zone->SetLayerSet( parseBoardItemLayersAsMask() );
break;
case T_layers: // keyword for zones that can live on a set of layer
// currently: keepout zones
zone->SetLayerSet( parseBoardItemLayersAsMask() );
break;
case T_tstamp:
zone->SetTimeStamp( parseHex() );
NeedRIGHT();
@ -3079,7 +3080,7 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER()
break;
default:
Expecting( "net, layer/layers, tstamp, hatch, priority, connect_pads, min_thickness, "
Expecting( "net, layer/layers, tstamp, hatch, priority, connect_pads, min_thickness, "
"fill, polygon, filled_polygon, or fill_segments" );
}
}
@ -3128,6 +3129,8 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER()
// and update the zone netcode
zone->SetNetCode( net->GetNet() );
// FIXME: a call to any GUI item is not allowed in io plugins:
// Change this code to generate a warning message outside this plugin
// Prompt the user
wxString msg;
msg.Printf( _( "There is a zone that belongs to a not existing net\n"