Gerbview: locate item now does not take in account not visible layers. Remove an unused file
3d viewer: Remove a few ToUTF8() bad usage (replaced by GetData() )
This commit is contained in:
parent
eaa7f3f114
commit
9f46d83175
|
@ -225,8 +225,8 @@ bool S3D_FILENAME_RESOLVER::createPathList( void )
|
|||
|
||||
while( sPL != ePL )
|
||||
{
|
||||
wxLogTrace( MASK_3D_RESOLVER, " + %s : '%s'\n", (*sPL).m_alias.ToUTF8(),
|
||||
(*sPL).m_pathexp.ToUTF8() );
|
||||
wxLogTrace( MASK_3D_RESOLVER, " + %s : '%s'\n", (*sPL).m_alias.GetData(),
|
||||
(*sPL).m_pathexp.GetData() );
|
||||
++sPL;
|
||||
}
|
||||
#endif
|
||||
|
@ -317,7 +317,7 @@ wxString S3D_FILENAME_RESOLVER::ResolvePath( const wxString& aFileName )
|
|||
wxString errmsg = "[3D File Resolver] No such path; ensure the environment var is defined";
|
||||
errmsg.append( "\n" );
|
||||
errmsg.append( tname );
|
||||
wxLogMessage( "%s\n", errmsg.ToUTF8() );
|
||||
wxLogMessage( errmsg );
|
||||
}
|
||||
|
||||
return wxEmptyString;
|
||||
|
@ -392,7 +392,7 @@ wxString S3D_FILENAME_RESOLVER::ResolvePath( const wxString& aFileName )
|
|||
wxString errmsg = "[3D File Resolver] No such path";
|
||||
errmsg.append( "\n" );
|
||||
errmsg.append( tname );
|
||||
wxLogTrace( MASK_3D_RESOLVER, "%s\n", errmsg.ToUTF8() );
|
||||
wxLogTrace( MASK_3D_RESOLVER, errmsg );
|
||||
}
|
||||
|
||||
return wxEmptyString;
|
||||
|
@ -428,7 +428,7 @@ wxString S3D_FILENAME_RESOLVER::ResolvePath( const wxString& aFileName )
|
|||
wxString errmsg = "[3D File Resolver] No such path; ensure the path alias is defined";
|
||||
errmsg.append( "\n" );
|
||||
errmsg.append( tname.substr( 1 ) );
|
||||
wxLogTrace( MASK_3D_RESOLVER, "%s\n", errmsg.ToUTF8() );
|
||||
wxLogTrace( MASK_3D_RESOLVER, errmsg );
|
||||
}
|
||||
|
||||
return wxEmptyString;
|
||||
|
|
|
@ -61,7 +61,7 @@ S3D_PLUGIN_MANAGER::S3D_PLUGIN_MANAGER()
|
|||
|
||||
while( sM != eM )
|
||||
{
|
||||
wxLogTrace( MASK_3D_PLUGINMGR, " + '%s' [%s]\n", sM->first.ToUTF8(),
|
||||
wxLogTrace( MASK_3D_PLUGINMGR, " + '%s' [%s]\n", sM->first.GetData(),
|
||||
sM->second->GetKicadPluginName() );
|
||||
++sM;
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ S3D_PLUGIN_MANAGER::S3D_PLUGIN_MANAGER()
|
|||
|
||||
while( sFF != eFF )
|
||||
{
|
||||
wxLogTrace( MASK_3D_PLUGINMGR, " + '%s'\n", (*sFF).ToUTF8() );
|
||||
wxLogTrace( MASK_3D_PLUGINMGR, " + '%s'\n", (*sFF).GetData() );
|
||||
++sFF;
|
||||
}
|
||||
}
|
||||
|
@ -348,7 +348,7 @@ void S3D_PLUGIN_MANAGER::checkPluginName( const wxString& aPath,
|
|||
|
||||
#ifdef DEBUG
|
||||
wxLogTrace( MASK_3D_PLUGINMGR, " * [INFO] found 3D plugin '%s'\n",
|
||||
wxpath.ToUTF8() );
|
||||
wxpath.GetData() );
|
||||
#endif
|
||||
|
||||
return;
|
||||
|
@ -364,7 +364,7 @@ void S3D_PLUGIN_MANAGER::checkPluginPath( const wxString& aPath,
|
|||
|
||||
#ifdef DEBUG
|
||||
wxLogTrace( MASK_3D_PLUGINMGR, " * [INFO] checking for 3D plugins in '%s'\n",
|
||||
aPath.ToUTF8() );
|
||||
aPath.GetData() );
|
||||
#endif
|
||||
|
||||
wxFileName path;
|
||||
|
|
|
@ -486,7 +486,7 @@ void CINFO3D_VISU::createBoardPolygon()
|
|||
errmsg.append( _( "Unable to calculate the board outlines." ) );
|
||||
errmsg.append( wxT( "\n" ) );
|
||||
errmsg.append( _( "Therefore use the board boundary box." ) );
|
||||
wxLogMessage( "%s", errmsg.GetData() );
|
||||
wxLogMessage( errmsg );
|
||||
}
|
||||
|
||||
m_board_poly.BooleanSubtract( allLayerHoles, SHAPE_POLY_SET::PM_FAST );
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr
|
||||
* Copyright (C) 1992-2012 KiCad Developers, see change_log.txt for contributors.
|
||||
* Copyright (C) 2016 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 1992-2016 KiCad Developers, see change_log.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
|
||||
|
@ -38,6 +38,7 @@
|
|||
|
||||
/* locate a gerber item and return a pointer to it.
|
||||
* Display info about this item
|
||||
* Items on non visible layers are not taken in account
|
||||
*/
|
||||
GERBER_DRAW_ITEM* GERBVIEW_FRAME::Locate( const wxPoint& aPosition, int aTypeloc )
|
||||
{
|
||||
|
@ -51,10 +52,11 @@ GERBER_DRAW_ITEM* GERBVIEW_FRAME::Locate( const wxPoint& aPosition, int aTypeloc
|
|||
int layer = getActiveLayer();
|
||||
GERBER_FILE_IMAGE* gerber = GetGbrImage( layer );
|
||||
|
||||
// Search first on active layer
|
||||
GERBER_DRAW_ITEM* gerb_item = NULL;
|
||||
|
||||
if( gerber ) // A not used graphic layer can be selected. So gerber can be NULL
|
||||
// Search first on active layer
|
||||
// A not used graphic layer can be selected. So gerber can be NULL
|
||||
if( gerber && IsLayerVisible( layer ) )
|
||||
{
|
||||
for( gerb_item = gerber->GetItemsList(); gerb_item; gerb_item = gerb_item->Next() )
|
||||
{
|
||||
|
@ -75,6 +77,9 @@ GERBER_DRAW_ITEM* GERBVIEW_FRAME::Locate( const wxPoint& aPosition, int aTypeloc
|
|||
if( gerber == NULL ) // Graphic layer not yet used
|
||||
continue;
|
||||
|
||||
if( !IsLayerVisible( layer ) )
|
||||
continue;
|
||||
|
||||
for( gerb_item = gerber->GetItemsList(); gerb_item; gerb_item = gerb_item->Next() )
|
||||
{
|
||||
if( gerb_item->HitTest( ref ) )
|
||||
|
|
|
@ -52,13 +52,16 @@ public:
|
|||
};
|
||||
|
||||
// these members are used in the %TO object attributes command.
|
||||
int m_NetAttribType; ///< the type of net info
|
||||
int m_NetAttribType; ///< the type of net info
|
||||
///< (used to define the gerber string to create)
|
||||
bool m_NotInNet; ///< true if a pad of a footprint cannot be connected
|
||||
///< (for instance a mechanical NPTH, ot a not named pad)
|
||||
///< in this case the pad net name is empty in gerber file
|
||||
wxString m_Padname; ///< for a flashed pad: the pad name ((TO.P attribute)
|
||||
wxString m_Cmpref; ///< the component reference parent of the data
|
||||
wxString m_Netname; ///< for items associated to a net: the netname
|
||||
|
||||
GBR_NETLIST_METADATA(): m_NetAttribType( GBR_NETINFO_UNSPECIFIED )
|
||||
GBR_NETLIST_METADATA(): m_NetAttribType( GBR_NETINFO_UNSPECIFIED ), m_NotInNet( false )
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -777,6 +777,16 @@ void FOOTPRINT_EDIT_FRAME::updateTitle()
|
|||
// of libary selection UI.
|
||||
goto L_none;
|
||||
}
|
||||
|
||||
// Now, add the full path, for info
|
||||
if( nickname.size() )
|
||||
{
|
||||
FP_LIB_TABLE* libtable = Prj().PcbFootprintLibs();
|
||||
const FP_LIB_TABLE::ROW* row = libtable->FindRow( nickname );
|
||||
|
||||
if( row )
|
||||
title << " (" << row->GetFullURI( true ) << ")";
|
||||
}
|
||||
}
|
||||
|
||||
SetTitle( title );
|
||||
|
|
|
@ -721,12 +721,24 @@ void FOOTPRINT_VIEWER_FRAME::UpdateTitle()
|
|||
msg << wxT( " [" );
|
||||
|
||||
if( getCurNickname().size() )
|
||||
{
|
||||
msg << getCurNickname();
|
||||
}
|
||||
else
|
||||
msg += _( "no library selected" );
|
||||
|
||||
msg << wxT( "]" );
|
||||
|
||||
// Now, add the full path, for info
|
||||
if( getCurNickname().size() )
|
||||
{
|
||||
FP_LIB_TABLE* libtable = Prj().PcbFootprintLibs();
|
||||
const FP_LIB_TABLE::ROW* row = libtable->FindRow( getCurNickname() );
|
||||
|
||||
if( row )
|
||||
msg << " (" << row->GetFullURI( true ) << ")";
|
||||
}
|
||||
|
||||
SetTitle( msg );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue