kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #30809
Re: [PATCH] GerbView GAL support
While I'm waiting for review I made another small fix
On Sun, Sep 17, 2017 at 9:04 PM, Jon Evans <jon@xxxxxxxxxxxxx> wrote:
> One follow-on patch attached after I realized that a fix hadn't made its
> way in.
> -Jon
>
> On Sun, Sep 17, 2017 at 6:47 PM, Jon Evans <jon@xxxxxxxxxxxxx> wrote:
>
>> Hi all,
>>
>> The day has finally come! I have distilled my GerbView GAL branch into a
>> patchset attached to this email. Hopefully with this merged into master we
>> can identify any remaining bugs and clean it up for 5.0.
>>
>> Note that this set is split into 5 patches to make review easier, but
>> they are not intended to compile and work independently.
>>
>> Best,
>> Jon
>>
>
>
From f2d3cfce15c9f0e0f70fb9394e381ddb034b79ed Mon Sep 17 00:00:00 2001
From: Jon Evans <jon@xxxxxxxxxxxxx>
Date: Sun, 17 Sep 2017 21:26:07 -0400
Subject: [PATCH] Properly update toolbar buttons on application start
---
gerbview/events_called_functions.cpp | 2 ++
gerbview/gerbview_frame.h | 2 ++
gerbview/toolbars_gerber.cpp | 12 ++++++++++++
3 files changed, 16 insertions(+)
diff --git a/gerbview/events_called_functions.cpp b/gerbview/events_called_functions.cpp
index 310815279..61c1bf3b8 100644
--- a/gerbview/events_called_functions.cpp
+++ b/gerbview/events_called_functions.cpp
@@ -162,6 +162,8 @@ BEGIN_EVENT_TABLE( GERBVIEW_FRAME, EDA_DRAW_FRAME )
EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_NEGATIVE_ITEMS, GERBVIEW_FRAME::OnUpdateShowNegativeItems )
EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_LAYERS_MANAGER_VERTICAL_TOOLBAR,
GERBVIEW_FRAME::OnUpdateShowLayerManager )
+ EVT_UPDATE_UI( ID_TB_OPTIONS_DIFF_MODE, GERBVIEW_FRAME::OnUpdateDiffMode )
+ EVT_UPDATE_UI( ID_TB_OPTIONS_HIGH_CONTRAST_MODE, GERBVIEW_FRAME::OnUpdateHighContrastMode )
EVT_UPDATE_UI( ID_TOOLBARH_GERBER_SELECT_ACTIVE_DCODE, GERBVIEW_FRAME::OnUpdateSelectDCode )
EVT_UPDATE_UI( ID_TOOLBARH_GERBVIEW_SELECT_ACTIVE_LAYER,
diff --git a/gerbview/gerbview_frame.h b/gerbview/gerbview_frame.h
index a25b18f1a..8bbc8202f 100644
--- a/gerbview/gerbview_frame.h
+++ b/gerbview/gerbview_frame.h
@@ -563,6 +563,8 @@ public:
void OnUpdateShowLayerManager( wxUpdateUIEvent& aEvent );
void OnUpdateSelectDCode( wxUpdateUIEvent& aEvent );
void OnUpdateLayerSelectBox( wxUpdateUIEvent& aEvent );
+ void OnUpdateDiffMode( wxUpdateUIEvent& aEvent );
+ void OnUpdateHighContrastMode( wxUpdateUIEvent& aEvent );
/**
* Function BlockCommand
diff --git a/gerbview/toolbars_gerber.cpp b/gerbview/toolbars_gerber.cpp
index 43384e7e0..d4e60d44b 100644
--- a/gerbview/toolbars_gerber.cpp
+++ b/gerbview/toolbars_gerber.cpp
@@ -541,6 +541,18 @@ void GERBVIEW_FRAME::OnUpdateShowNegativeItems( wxUpdateUIEvent& aEvent )
}
+void GERBVIEW_FRAME::OnUpdateDiffMode( wxUpdateUIEvent& aEvent )
+{
+ aEvent.Check( m_DisplayOptions.m_DiffMode );
+}
+
+
+void GERBVIEW_FRAME::OnUpdateHighContrastMode( wxUpdateUIEvent& aEvent )
+{
+ aEvent.Check( m_DisplayOptions.m_HighContrastMode );
+}
+
+
void GERBVIEW_FRAME::OnUpdateShowLayerManager( wxUpdateUIEvent& aEvent )
{
aEvent.Check( m_show_layer_manager_tools );
--
2.11.0
Follow ups
References