← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] Add drawing priority support to VIEW

 

Hi,

The attached patch needs to be applied after the one in my first message,
turns out that I didn't properly rebuild pcbnew and needed to change
board_commit to match the new VIEW::Add() signature.

Best,
Jon

On Mon, Feb 27, 2017 at 6:44 PM, Jon Evans <jon@xxxxxxxxxxxxx> wrote:

> Hi all,
>
> Thanks to Tom's suggestion on how to approach this, I've got it working
> and now GerbView can properly render negative objects in GAL.  This patch
> should have no impact on pcbnew.
>
> By the way, I'm getting close to feeling like I can share the work I'm
> doing on GerbView in a private branch, but there are still a few things
> that are broken enough that it doesn't make sense to subject other people
> to them :-)
>
> Best,
> Jon
>
From 392576d32a868021856cf38070ed969b8d0a96e5 Mon Sep 17 00:00:00 2001
From: Jon Evans <jon@xxxxxxxxxxxxx>
Date: Mon, 27 Feb 2017 21:31:45 -0500
Subject: [PATCH] Fix std::bind calls after change to VIEW::Add

---
 pcbnew/board_commit.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pcbnew/board_commit.cpp b/pcbnew/board_commit.cpp
index e245782..bad4616 100644
--- a/pcbnew/board_commit.cpp
+++ b/pcbnew/board_commit.cpp
@@ -117,7 +117,7 @@ void BOARD_COMMIT::Push( const wxString& aMessage )
                     if( boardItem->Type() == PCB_MODULE_T )
                     {
                         MODULE* mod = static_cast<MODULE*>( boardItem );
-                        mod->RunOnChildren( std::bind( &KIGFX::VIEW::Add, view, _1 ) );
+                        mod->RunOnChildren( std::bind( &KIGFX::VIEW::Add, view, _1, -1 ) );
                     }
                 }
                 else
@@ -327,7 +327,7 @@ void BOARD_COMMIT::Revert()
             {
                 MODULE* newModule = static_cast<MODULE*>( item );
                 newModule->RunOnChildren( std::bind( &EDA_ITEM::ClearFlags, _1, SELECTED ) );
-                newModule->RunOnChildren( std::bind( &KIGFX::VIEW::Add, view, _1 ) );
+                newModule->RunOnChildren( std::bind( &KIGFX::VIEW::Add, view, _1, -1 ) );
             }
 
             view->Add( item );
@@ -355,7 +355,7 @@ void BOARD_COMMIT::Revert()
             {
                 MODULE* newModule = static_cast<MODULE*>( item );
                 newModule->RunOnChildren( std::bind( &EDA_ITEM::ClearFlags, _1, SELECTED ) );
-                newModule->RunOnChildren( std::bind( &KIGFX::VIEW::Add, view, _1 ) );
+                newModule->RunOnChildren( std::bind( &KIGFX::VIEW::Add, view, _1, -1 ) );
             }
 
             view->Add( item );
-- 
2.7.4


Follow ups

References