eeschema, libedit: fixed a bug than crashes libedit when using the delete tool, on a left click.
This commit is contained in:
parent
4b2f33a9d2
commit
c03abc0b65
|
@ -539,6 +539,7 @@ EDA_Rect& EDA_Rect::Inflate( int aDelta )
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
Inflate( aDelta, aDelta );
|
Inflate( aDelta, aDelta );
|
||||||
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************/
|
/**************************************************/
|
||||||
|
|
|
@ -229,20 +229,11 @@ void DIALOG_CVPCB_CONFIG::OnAddOrInsertLibClick( wxCommandEvent& event )
|
||||||
* because it preserve use of default libraries paths, when the path
|
* because it preserve use of default libraries paths, when the path
|
||||||
* is a sub path of these default paths
|
* is a sub path of these default paths
|
||||||
*/
|
*/
|
||||||
if( wxGetApp().GetLibraryPathList().Index( fn.GetPath() ) != wxNOT_FOUND ) // Ok, trivial case
|
libfilename = wxGetApp().ReturnFilenameWithRelativePathInLibPath( fn.GetFullPath() );
|
||||||
libfilename = fn.GetName();
|
// Remove extension:
|
||||||
else // not in the default, : see if this file is in a subpath:
|
fn = libfilename;
|
||||||
{
|
fn.SetExt(wxEmptyString);
|
||||||
libfilename = fn.GetPathWithSep() + fn.GetName();
|
libfilename = fn.GetFullPath();
|
||||||
for( unsigned kk = 0; kk < wxGetApp().GetLibraryPathList().GetCount(); kk++ )
|
|
||||||
{
|
|
||||||
if( fn.MakeRelativeTo( wxGetApp().GetLibraryPathList()[kk] ) )
|
|
||||||
{
|
|
||||||
libfilename = fn.GetPathWithSep() + fn.GetName();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Add or insert new library name, if not already in list
|
//Add or insert new library name, if not already in list
|
||||||
if( list->FindString( libfilename, fn.IsCaseSensitive() ) == wxNOT_FOUND )
|
if( list->FindString( libfilename, fn.IsCaseSensitive() ) == wxNOT_FOUND )
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
#include "wx/msw/wx.rc"
|
|
|
@ -1247,7 +1247,7 @@ void LIB_SEGMENT::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC,
|
||||||
* bounding box calculation. */
|
* bounding box calculation. */
|
||||||
#if 0
|
#if 0
|
||||||
EDA_Rect bBox = GetBoundingBox();
|
EDA_Rect bBox = GetBoundingBox();
|
||||||
bBox.Inflate( m_Width + 2, m_Width + 2 );
|
bBox.Inflate( m_Width + 2 );
|
||||||
GRRect( &aPanel->m_ClipBox, aDC, bBox.GetOrigin().x, bBox.GetOrigin().y,
|
GRRect( &aPanel->m_ClipBox, aDC, bBox.GetOrigin().x, bBox.GetOrigin().y,
|
||||||
bBox.GetEnd().x, bBox.GetEnd().y, 0, LIGHTMAGENTA );
|
bBox.GetEnd().x, bBox.GetEnd().y, 0, LIGHTMAGENTA );
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -242,20 +242,11 @@ void DIALOG_EESCHEMA_CONFIG::OnAddOrInsertLibClick( wxCommandEvent& event )
|
||||||
* because it preserve use of default libraries paths, when the path
|
* because it preserve use of default libraries paths, when the path
|
||||||
* is a sub path of these default paths
|
* is a sub path of these default paths
|
||||||
*/
|
*/
|
||||||
if( wxGetApp().GetLibraryPathList().Index( fn.GetPath() ) != wxNOT_FOUND ) // Ok, trivial case
|
libfilename = wxGetApp().ReturnFilenameWithRelativePathInLibPath( fn.GetFullPath() );
|
||||||
libfilename = fn.GetName();
|
// Remove extension:
|
||||||
else // not in the default, : see if this file is in a subpath:
|
fn = libfilename;
|
||||||
{
|
fn.SetExt(wxEmptyString);
|
||||||
libfilename = fn.GetPathWithSep() + fn.GetName();
|
libfilename = fn.GetFullPath();
|
||||||
for ( unsigned kk = 0; kk < wxGetApp().GetLibraryPathList().GetCount(); kk ++ )
|
|
||||||
{
|
|
||||||
if( fn.MakeRelativeTo(wxGetApp().GetLibraryPathList()[kk] ) )
|
|
||||||
{
|
|
||||||
libfilename = fn.GetPathWithSep() + fn.GetName();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Add or insert new library name, if not already in list
|
//Add or insert new library name, if not already in list
|
||||||
if( m_ListLibr->FindString( libfilename, fn.IsCaseSensitive() ) == wxNOT_FOUND )
|
if( m_ListLibr->FindString( libfilename, fn.IsCaseSensitive() ) == wxNOT_FOUND )
|
||||||
|
|
|
@ -123,7 +123,10 @@ void WinEDA_LibeditFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
|
||||||
GetScreen()->m_Curseur );
|
GetScreen()->m_Curseur );
|
||||||
}
|
}
|
||||||
if( DrawEntry == NULL )
|
if( DrawEntry == NULL )
|
||||||
|
{
|
||||||
DisplayCmpDoc();
|
DisplayCmpDoc();
|
||||||
|
break;
|
||||||
|
}
|
||||||
SaveCopyInUndoList( m_component );
|
SaveCopyInUndoList( m_component );
|
||||||
if( DrawEntry->Type() == COMPONENT_PIN_DRAW_TYPE )
|
if( DrawEntry->Type() == COMPONENT_PIN_DRAW_TYPE )
|
||||||
DeletePin( DC, m_component, (LIB_PIN*) DrawEntry );
|
DeletePin( DC, m_component, (LIB_PIN*) DrawEntry );
|
||||||
|
|
|
@ -206,20 +206,11 @@ void DIALOG_PCBNEW_CONFIG_LIBS::OnAddOrInsertLibClick( wxCommandEvent& event )
|
||||||
* because it preserve use of default libraries paths, when the
|
* because it preserve use of default libraries paths, when the
|
||||||
* path is a sub path of these default paths
|
* path is a sub path of these default paths
|
||||||
*/
|
*/
|
||||||
if( wxGetApp().GetLibraryPathList().Index( fn.GetPath() ) != wxNOT_FOUND ) // Ok, trivial case
|
libfilename = wxGetApp().ReturnFilenameWithRelativePathInLibPath( fn.GetFullPath() );
|
||||||
libfilename = fn.GetName();
|
// Remove extension:
|
||||||
else // not in the default, : see if this file is in a subpath:
|
fn = libfilename;
|
||||||
{
|
fn.SetExt(wxEmptyString);
|
||||||
libfilename = fn.GetPathWithSep() + fn.GetName();
|
libfilename = fn.GetFullPath();
|
||||||
for ( unsigned kk = 0; kk < wxGetApp().GetLibraryPathList().GetCount(); kk ++ )
|
|
||||||
{
|
|
||||||
if( fn.MakeRelativeTo(wxGetApp().GetLibraryPathList()[kk] ) )
|
|
||||||
{
|
|
||||||
libfilename = fn.GetPathWithSep() + fn.GetName();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Add or insert new library name, if not already in list
|
//Add or insert new library name, if not already in list
|
||||||
if( m_ListLibr->FindString( libfilename, fn.IsCaseSensitive() ) == wxNOT_FOUND )
|
if( m_ListLibr->FindString( libfilename, fn.IsCaseSensitive() ) == wxNOT_FOUND )
|
||||||
|
|
Loading…
Reference in New Issue