diff --git a/gerbview/files.cpp b/gerbview/files.cpp
index 93429cd164..0b008d94cc 100644
--- a/gerbview/files.cpp
+++ b/gerbview/files.cpp
@@ -316,7 +316,17 @@ bool GERBVIEW_FRAME::loadListOfGerberAndDrillFiles( const wxString& aPath,
}
else
{
- if( Read_GERBER_File( filename.GetFullPath() ) )
+ if( filename.GetExt() == GerberJobFileExtension.c_str() )
+ {
+ //We cannot read a gerber job file as a gerber plot file: skip it
+ wxString txt;
+ txt.Printf(
+ _( "A gerber job file cannot be loaded as a plot file %s" ),
+ filename.GetFullName() );
+ success = false;
+ reporter.Report( txt, RPT_SEVERITY_ERROR );
+ }
+ else if( Read_GERBER_File( filename.GetFullPath() ) )
{
UpdateFileHistory( m_lastFileName );
@@ -545,6 +555,18 @@ bool GERBVIEW_FRAME::unarchiveFiles( const wxString& aFullFileName, REPORTER* aR
continue;
}
+ if( curr_ext == GerberJobFileExtension.c_str() )
+ {
+ //We cannot read a gerber job file as a gerber plot file: skip it
+ if( aReporter )
+ {
+ msg.Printf( _( "Info: skip file \"%s\" (gerber job file)\n" ), entry->GetName() );
+ aReporter->Report( msg, RPT_SEVERITY_WARNING );
+ }
+
+ continue;
+ }
+
int layer = GetActiveLayer();
if( layer == NO_AVAILABLE_LAYERS )
diff --git a/gerbview/tools/gerbview_actions.cpp b/gerbview/tools/gerbview_actions.cpp
index 2a1fa9c2de..2852322b3d 100644
--- a/gerbview/tools/gerbview_actions.cpp
+++ b/gerbview/tools/gerbview_actions.cpp
@@ -57,8 +57,8 @@ OPT GERBVIEW_ACTIONS::TranslateLegacyId( int aId )
//
TOOL_ACTION GERBVIEW_ACTIONS::openGerber( "gerbview.Control.openGerber",
AS_GLOBAL, 0, "",
- _( "Open Gerber File(s)..." ),
- _( "Open Gerber file(s) on the current layer. Previous data will be deleted" ),
+ _( "Open Gerber Plot File(s)..." ),
+ _( "Open Gerber plot file(s) on the current layer. Previous data will be deleted" ),
load_gerber_xpm );
TOOL_ACTION GERBVIEW_ACTIONS::openDrillFile( "gerbview.Control.openDrillFile",
@@ -70,7 +70,7 @@ TOOL_ACTION GERBVIEW_ACTIONS::openDrillFile( "gerbview.Control.openDrillFile",
TOOL_ACTION GERBVIEW_ACTIONS::openJobFile( "gerbview.Control.openJobFile",
AS_GLOBAL, 0, "",
_( "Open Gerber Job File..." ),
- _( "Open a Gerber job file and its associated gerber files" ),
+ _( "Open a Gerber job file and its associated gerber plot files" ),
gerber_job_file_xpm );
TOOL_ACTION GERBVIEW_ACTIONS::openZipFile( "gerbview.Control.openZipFile",