← Back to team overview

kicad-developers team mailing list archive

[PATCH] Footprint viewer: zooming from toolbar and menu doesn't works in GAL mode

 

To reproduce:
1) launch Pcbnew;
2) switch to OpenGL;
3) launch Footprint viewer (Library browser);
4) select some footprint;
5) click zoom in/out/page icon on toolbar;
6) nothing happens.

In legacy mode zooming works fine.
Attached patch contains fix.
From 404d01830ac3593d73bec18f81ffca77a40841cb Mon Sep 17 00:00:00 2001
From: Baranovskiy Konstantin <baranovskiykonstantin@xxxxxxxxx>
Date: Tue, 26 Sep 2017 15:35:21 +0300
Subject: [PATCH] Footprint viewer: fix zooming from toolbar or menu in GAL.

---
 pcbnew/tools/pcb_actions.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/pcbnew/tools/pcb_actions.cpp b/pcbnew/tools/pcb_actions.cpp
index aba31f22a..ca1e364d6 100644
--- a/pcbnew/tools/pcb_actions.cpp
+++ b/pcbnew/tools/pcb_actions.cpp
@@ -100,12 +100,15 @@ boost::optional<TOOL_EVENT> PCB_ACTIONS::TranslateLegacyId( int aId )
         return ACTIONS::gridSetOrigin.MakeEvent();
 
     case ID_ZOOM_IN:        // toolbar button "Zoom In"
+    case ID_VIEWER_ZOOM_IN:
         return ACTIONS::zoomInCenter.MakeEvent();
 
     case ID_ZOOM_OUT:       // toolbar button "Zoom In"
+    case ID_VIEWER_ZOOM_OUT:
         return ACTIONS::zoomOutCenter.MakeEvent();
 
     case ID_ZOOM_PAGE:      // toolbar button "Fit on Screen"
+    case ID_VIEWER_ZOOM_PAGE:
         return ACTIONS::zoomFitScreen.MakeEvent();
 
     case ID_TB_OPTIONS_SHOW_TRACKS_SKETCH:
-- 
2.14.1


Follow ups