From 0f7e3580300b5817047fa4edeb07744ccc30085d Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 8 Apr 2015 14:50:36 +0200 Subject: [PATCH] 3D viewer: fix a bug introduced in rev 5579s. Remove a few useless wxBusyCursor. Minor other fixes. --- 3d-viewer/vrml_aux.cpp | 2 +- cvpcb/cvframe.cpp | 1 - eeschema/annotate.cpp | 2 -- eeschema/netform.cpp | 1 - eeschema/netlist.cpp | 2 -- eeschema/schframe.cpp | 3 ++- pcbnew/autorouter/autorout.h | 2 +- pcbnew/autorouter/queue.cpp | 15 +++++---------- 8 files changed, 9 insertions(+), 19 deletions(-) diff --git a/3d-viewer/vrml_aux.cpp b/3d-viewer/vrml_aux.cpp index 5eb680c0bc..31bcb0cfb3 100644 --- a/3d-viewer/vrml_aux.cpp +++ b/3d-viewer/vrml_aux.cpp @@ -224,7 +224,7 @@ int ParseVertexList( FILE* File, std::vector& dst_vector ) glm::vec3 vertex; - while( ParseVertex( File, vertex ) == 3 ) + while( ParseVertex( File, vertex ) ) { dst_vector.push_back( vertex ); } diff --git a/cvpcb/cvframe.cpp b/cvpcb/cvframe.cpp index 1aaab4a421..d73367b39a 100644 --- a/cvpcb/cvframe.cpp +++ b/cvpcb/cvframe.cpp @@ -794,7 +794,6 @@ void CVPCB_MAINFRAME::SendMessageToEESCHEMA() int CVPCB_MAINFRAME::ReadSchematicNetlist() { - wxBusyCursor dummy; // Shows an hourglass while loading. NETLIST_READER* netlistReader; wxString msg; wxString compFootprintLinkFileName; diff --git a/eeschema/annotate.cpp b/eeschema/annotate.cpp index f041fe39a5..cb47703409 100644 --- a/eeschema/annotate.cpp +++ b/eeschema/annotate.cpp @@ -68,8 +68,6 @@ void SCH_EDIT_FRAME::AnnotateComponents( bool aAnnotateSchematic, { SCH_REFERENCE_LIST references; - wxBusyCursor dummy; - SCH_SCREENS screens; // Build the sheet list. diff --git a/eeschema/netform.cpp b/eeschema/netform.cpp index cd70246752..ab8e584fd7 100644 --- a/eeschema/netform.cpp +++ b/eeschema/netform.cpp @@ -50,7 +50,6 @@ bool SCH_EDIT_FRAME::WriteNetListFile( NETLIST_OBJECT_LIST * aConnectedItemsList bool executeCommandLine = false; wxString fileName = aFullFileName; - wxBusyCursor Busy; NETLIST_EXPORTER *helper; switch( aFormat ) diff --git a/eeschema/netlist.cpp b/eeschema/netlist.cpp index 2fb4189f6c..7f36cf18ab 100644 --- a/eeschema/netlist.cpp +++ b/eeschema/netlist.cpp @@ -136,8 +136,6 @@ void NETLIST_OBJECT_LIST::SortListbySheet() NETLIST_OBJECT_LIST * SCH_EDIT_FRAME::BuildNetListBase() { - wxBusyCursor Busy; - // Creates the flattened sheet list: SCH_SHEET_LIST aSheets; diff --git a/eeschema/schframe.cpp b/eeschema/schframe.cpp index 0580144d56..bcb9cb9c90 100644 --- a/eeschema/schframe.cpp +++ b/eeschema/schframe.cpp @@ -985,9 +985,10 @@ void SCH_EDIT_FRAME::OnOpenCvpcb( wxCommandEvent& event ) if( !player ) { player = Kiway().Player( FRAME_CVPCB, true ); - player->OpenProjectFiles( std::vector( 1, fn.GetFullPath() ) ); player->Show( true ); + player->OpenProjectFiles( std::vector( 1, fn.GetFullPath() ) ); } + player->Raise(); } } diff --git a/pcbnew/autorouter/autorout.h b/pcbnew/autorouter/autorout.h index 02d004c4ab..348191fa78 100644 --- a/pcbnew/autorouter/autorout.h +++ b/pcbnew/autorouter/autorout.h @@ -218,7 +218,7 @@ void TraceFilledRectangle( int ux0, int uy0, int ux1, int uy1, void FreeQueue(); void InitQueue(); void GetQueue( int *, int *, int *, int *, int * ); -int SetQueue( int, int, int, int, int, int, int ); +bool SetQueue( int, int, int, int, int, int, int ); void ReSetQueue( int, int, int, int, int, int, int ); /* WORK.CPP */ diff --git a/pcbnew/autorouter/queue.cpp b/pcbnew/autorouter/queue.cpp index ca251608a2..0cf1977d5f 100644 --- a/pcbnew/autorouter/queue.cpp +++ b/pcbnew/autorouter/queue.cpp @@ -1,11 +1,11 @@ /* * 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) 2015 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck * Copyright (C) 2011 Wayne Stambaugh * - * Copyright (C) 1992-2012 KiCad Developers, see change_log.txt for contributors. + * Copyright (C) 1992-2015 KiCad Developers, see change_log.txt for contributors. * * First copyright (C) Randy Nevin, 1989 (see PCBCA package) * @@ -56,12 +56,6 @@ static struct PcbQueue* Tail = NULL; static struct PcbQueue* Save = NULL; /* hold empty queue structs */ -void InitQueue(); -void GetQueue( int*, int*, int*, int*, int* ); -int SetQueue( int, int, int, int, int, int, int ); -void ReSetQueue( int, int, int, int, int, int, int ); - - /* Free the memory used for storing all the queue */ void FreeQueue() { @@ -123,7 +117,7 @@ void GetQueue( int* r, int* c, int* s, int* d, int* a ) * 1 - OK * 0 - Failed to allocate memory. */ -int SetQueue( int r, int c, int side, int d, int a, int r2, int c2 ) +bool SetQueue( int r, int c, int side, int d, int a, int r2, int c2 ) { struct PcbQueue* p, * q, * t; int i, j; @@ -221,5 +215,6 @@ void ReSetQueue( int r, int c, int s, int d, int a, int r2, int c2 ) ClosNodes--; /* we will close it again, but just count once */ /* if it was there, it's gone now; insert it at the proper position */ - SetQueue( r, c, s, d, a, r2, c2 ); + bool res = SetQueue( r, c, s, d, a, r2, c2 ); + (void) res; }