Here are two more quick patches addressing some of the easier changes.
I have some other bugs to look at that seem more urgent, so I'm not going
to work on the right-click menu or settings persistence.

Thanks,
Jon

On Thu, Feb 22, 2018 at 6:15 PM, Wayne Stambaugh <stambau...@gmail.com>
wrote:

> Patch merged.  Thanks.
>
>
> On 02/21/2018 11:39 PM, Jon Evans wrote:
>
>> Hi all,
>>
>> This patch rearranges the Render panel to be in a more logical order, and
>> adds some whitespace.
>> I divided it into three groupings:
>> 1) footprint related
>> 2) other board objects
>> 3) non-board stuff like grid, ratlines, etc.
>>
>> I also bumped out the default size so that scrollbars aren't needed by
>> default on my Linux system.
>>
>> -Jon
>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to     : kicad-developers@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
From f68aef258199e963401fb0829f50639bd6f06048 Mon Sep 17 00:00:00 2001
From: Jon Evans <j...@craftyjon.com>
Date: Thu, 22 Feb 2018 19:02:20 -0500
Subject: [PATCH 2/2] Only show microvia and blind/buried via settings if they
 are enabled

---
 pcbnew/pcb_edit_frame.cpp   |  1 +
 pcbnew/pcb_layer_widget.cpp | 10 +++++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/pcbnew/pcb_edit_frame.cpp b/pcbnew/pcb_edit_frame.cpp
index 682d6da8f..dd3c79398 100644
--- a/pcbnew/pcb_edit_frame.cpp
+++ b/pcbnew/pcb_edit_frame.cpp
@@ -828,6 +828,7 @@ void PCB_EDIT_FRAME::ShowDesignRulesEditor( wxCommandEvent& event )
     {
         ReCreateLayerBox();
         ReCreateAuxiliaryToolbar();
+        m_Layers->ReFillRender();
         OnModify();
     }
 }
diff --git a/pcbnew/pcb_layer_widget.cpp b/pcbnew/pcb_layer_widget.cpp
index da8f38a41..97960893d 100644
--- a/pcbnew/pcb_layer_widget.cpp
+++ b/pcbnew/pcb_layer_widget.cpp
@@ -388,6 +388,8 @@ void PCB_LAYER_WIDGET::SetLayersManagerTabsText()
 void PCB_LAYER_WIDGET::ReFillRender()
 {
     BOARD* board = myframe->GetBoard();
+    auto settings = board->GetDesignSettings();
+
     ClearRenderRows();

     // Add "Items" tab rows to LAYER_WIDGET, after setting color and checkbox state.
@@ -401,6 +403,12 @@ void PCB_LAYER_WIDGET::ReFillRender()
         if( m_fp_editor_mode && !isAllowedInFpMode( renderRow.id ) )
             continue;

+        if( renderRow.id == LAYER_VIA_MICROVIA && !settings.m_MicroViasAllowed )
+            continue;
+
+        if( renderRow.id == LAYER_VIA_BBLIND && !settings.m_BlindBuriedViaAllowed )
+            continue;
+
         renderRow.tooltip = wxGetTranslation( s_render_rows[row].tooltip );
         renderRow.rowName = wxGetTranslation( s_render_rows[row].rowName );

--
2.14.1

From 1d08a35d5c3d10a2f8484beb2e1c7ddf4e139638 Mon Sep 17 00:00:00 2001
From: Jon Evans <j...@craftyjon.com>
Date: Thu, 22 Feb 2018 18:54:50 -0500
Subject: [PATCH 1/2] Rename "Render" to "Items" and a few other wording
 changes

---
 gerbview/gerbview_layer_widget.cpp |  4 ++--
 pcbnew/layer_widget.cpp            |  4 ++--
 pcbnew/pcb_layer_widget.cpp        | 28 ++++++++++++++--------------
 3 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/gerbview/gerbview_layer_widget.cpp b/gerbview/gerbview_layer_widget.cpp
index 415cfc011..7373a8250 100644
--- a/gerbview/gerbview_layer_widget.cpp
+++ b/gerbview/gerbview_layer_widget.cpp
@@ -92,8 +92,8 @@ bool GERBER_LAYER_WIDGET::AreArbitraryColorsAllowed()

 void GERBER_LAYER_WIDGET::SetLayersManagerTabsText( )
 {
-    m_notebook->SetPageText(0, _("Layer") );
-    m_notebook->SetPageText(1, _("Render") );
+    m_notebook->SetPageText(0, _("Layers") );
+    m_notebook->SetPageText(1, _("Items") );
 }

 /**
diff --git a/pcbnew/layer_widget.cpp b/pcbnew/layer_widget.cpp
index 3969e14f9..9f36a5f8c 100644
--- a/pcbnew/layer_widget.cpp
+++ b/pcbnew/layer_widget.cpp
@@ -495,7 +495,7 @@ LAYER_WIDGET::LAYER_WIDGET( wxWindow* aParent, wxWindow* aFocusOwner, int aPoint
     m_LayerPanel->SetSizer( bSizer3 );
     m_LayerPanel->Layout();
     bSizer3->Fit( m_LayerPanel );
-    m_notebook->AddPage( m_LayerPanel, _( "Layer" ), true );
+    m_notebook->AddPage( m_LayerPanel, _( "Layers" ), true );
     m_RenderingPanel = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );

     wxBoxSizer* bSizer4;
@@ -515,7 +515,7 @@ LAYER_WIDGET::LAYER_WIDGET( wxWindow* aParent, wxWindow* aFocusOwner, int aPoint
     m_RenderingPanel->SetSizer( bSizer4 );
     m_RenderingPanel->Layout();
     bSizer4->Fit( m_RenderingPanel );
-    m_notebook->AddPage( m_RenderingPanel, _( "Render" ), false );
+    m_notebook->AddPage( m_RenderingPanel, _( "Items" ), false );

     boxSizer->Add( m_notebook, 1, wxEXPAND | wxALL, 5 );

diff --git a/pcbnew/pcb_layer_widget.cpp b/pcbnew/pcb_layer_widget.cpp
index 072431648..da8f38a41 100644
--- a/pcbnew/pcb_layer_widget.cpp
+++ b/pcbnew/pcb_layer_widget.cpp
@@ -63,17 +63,17 @@ const LAYER_WIDGET::ROW PCB_LAYER_WIDGET::s_render_rows[] = {
 #define RR  LAYER_WIDGET::ROW   // Render Row abbreviation to reduce source width
 #define NOCOLOR COLOR4D::UNSPECIFIED    // specify rows that do not have a color selector icon

-         // text                id                      color       tooltip
-    RR( _( "Footprints Front" ),LAYER_MOD_FR,         NOCOLOR,  _( "Show footprints that are on board's front") ),
-    RR( _( "Footprints Back" ), LAYER_MOD_BK,         NOCOLOR,  _( "Show footprints that are on board's back") ),
-    RR( _( "Values" ),          LAYER_MOD_VALUES,     NOCOLOR,  _( "Show footprint values") ),
-    RR( _( "References" ),      LAYER_MOD_REFERENCES, NOCOLOR,  _( "Show footprint references") ),
-    RR( _( "Text Front" ),      LAYER_MOD_TEXT_FR,    NOCOLOR,  _( "Show footprint text on board's front" ) ),
-    RR( _( "Text Back" ),       LAYER_MOD_TEXT_BK,    NOCOLOR,  _( "Show footprint text on board's back" ) ),
-    RR( _( "Hidden Text" ),     LAYER_MOD_TEXT_INVISIBLE, WHITE, _( "Show footprint text marked as invisible" ) ),
-    RR( _( "Pads Front" ),      LAYER_PAD_FR,         WHITE,    _( "Show footprint pads on board's front" ) ),
-    RR( _( "Pads Back" ),       LAYER_PAD_BK,         WHITE,    _( "Show footprint pads on board's back" ) ),
-    RR( _( "Through Hole Pads" ),LAYER_PADS_TH,       YELLOW,   _( "Show through hole pads in specific color") ),
+         // text                     id                      color       tooltip
+    RR( _( "Footprints Front" ),     LAYER_MOD_FR,         NOCOLOR,  _( "Show footprints that are on board's front") ),
+    RR( _( "Footprints Back" ),      LAYER_MOD_BK,         NOCOLOR,  _( "Show footprints that are on board's back") ),
+    RR( _( "Values" ),               LAYER_MOD_VALUES,     NOCOLOR,  _( "Show footprint values") ),
+    RR( _( "References" ),           LAYER_MOD_REFERENCES, NOCOLOR,  _( "Show footprint references") ),
+    RR( _( "Footprint Text Front" ), LAYER_MOD_TEXT_FR,    NOCOLOR,  _( "Show footprint text on board's front" ) ),
+    RR( _( "Footprint Text Back" ),  LAYER_MOD_TEXT_BK,    NOCOLOR,  _( "Show footprint text on board's back" ) ),
+    RR( _( "Hidden Text" ),          LAYER_MOD_TEXT_INVISIBLE, WHITE, _( "Show footprint text marked as invisible" ) ),
+    RR( _( "Pads Front" ),           LAYER_PAD_FR,         WHITE,    _( "Show footprint pads on board's front" ) ),
+    RR( _( "Pads Back" ),            LAYER_PAD_BK,         WHITE,    _( "Show footprint pads on board's back" ) ),
+    RR( _( "Through Hole Pads" ),    LAYER_PADS_TH,        YELLOW,   _( "Show through hole pads in specific color") ),
     RR(),
     RR( _( "Tracks" ),          LAYER_TRACKS,         NOCOLOR,  _( "Show tracks" ) ),
     RR( _( "Through Via" ),     LAYER_VIA_THROUGH,    WHITE,    _( "Show through vias" ) ),
@@ -380,8 +380,8 @@ void PCB_LAYER_WIDGET::onPopupSelection( wxCommandEvent& event )

 void PCB_LAYER_WIDGET::SetLayersManagerTabsText()
 {
-    m_notebook->SetPageText( 0, _( "Layer" ) );
-    m_notebook->SetPageText( 1, _( "Render" ) );
+    m_notebook->SetPageText( 0, _( "Layers" ) );
+    m_notebook->SetPageText( 1, _( "Items" ) );
 }


@@ -390,7 +390,7 @@ void PCB_LAYER_WIDGET::ReFillRender()
     BOARD* board = myframe->GetBoard();
     ClearRenderRows();

-    // Add "Render" tab rows to LAYER_WIDGET, after setting color and checkbox state.
+    // Add "Items" tab rows to LAYER_WIDGET, after setting color and checkbox state.
     // Because s_render_rows is created static, we must explicitly call
     // wxGetTranslation for texts which are internationalized (tool tips
     // and item names)
--
2.14.1

_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to