From 3f5c3d434900320955b28b101124d23637e0fa23 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 3 Feb 2014 16:02:54 +0100 Subject: [PATCH] Minor changes (fix cvpcb build issue, wx2.8 compatibility, some other stuff). --- common/CMakeLists.txt | 1 + pcbnew/CMakeLists.txt | 1 - pcbnew/pcb_painter.cpp | 3 +-- pcbnew/pcb_parser.cpp | 6 +++--- pcbnew/router/pns_router.cpp | 1 - 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 44569f29e2..cd3ae84acc 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -219,6 +219,7 @@ set( PCB_COMMON_SRCS ../pcbnew/class_zone.cpp ../pcbnew/class_zone_settings.cpp ../pcbnew/classpcb.cpp + ../pcbnew/ratsnest_data.cpp ../pcbnew/collectors.cpp ../pcbnew/netlist_reader.cpp ../pcbnew/legacy_netlist_reader.cpp diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 1ff4550e43..7a715d181c 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -221,7 +221,6 @@ set( PCBNEW_CLASS_SRCS print_board_functions.cpp printout_controler.cpp ratsnest.cpp - ratsnest_data.cpp ratsnest_viewitem.cpp # specctra.cpp #moved in pcbcommon lib # specctra_export.cpp diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 4ffdfa4667..b7f9ff0cc3 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -34,7 +34,6 @@ #include #include #include -#include #include #include @@ -281,7 +280,7 @@ void PCB_PAINTER::draw( const TRACK* aTrack, int aLayer ) if( !net ) return; - std::wstring netName = std::wstring( net->GetShortNetname().wc_str() ); + const wxString& netName = aTrack->GetShortNetname(); VECTOR2D textPosition = start + line / 2.0; // center of the track double textOrientation = -atan( line.y / line.x ); double textSize = std::min( static_cast( width ), length / netName.length() ); diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index 1f06ac2ed1..f68743b741 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -2426,9 +2426,9 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER() throw( IO_ERROR, PARSE_ERROR ) NeedSYMBOLorNUMBER(); if( m_board->FindNet( zone->GetNet() )->GetNetname() != FromUTF8() ) { - DisplayError( NULL, wxString::Format( _( "There is a zone that belongs to a not " - "existing net (%s), you should verify it." ), - FromUTF8() ) ); + wxString msg = _( "There is a zone that belongs to a not " + "existing net (" ) + FromUTF8() + _("), you should verify it." ); + DisplayError( NULL, msg ); zone->SetNet( NETINFO_LIST::UNCONNECTED ); } NeedRIGHT(); diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index 3046c13f6e..1babefa598 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -631,7 +631,6 @@ void PNS_ROUTER::commitRouting( PNS_NODE* aNode ) newBI->ClearFlags(); m_view->Add( newBI ); m_board->Add( newBI ); - m_board->GetRatsnest()->Update( newBI ); m_undoBuffer.PushItem( ITEM_PICKER( newBI, UR_NEW ) ); newBI->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); }