From e47c9ccc0b889e89c72cd23178c0ea1f3691b8f8 Mon Sep 17 00:00:00 2001 From: Ian McInerney Date: Wed, 14 Aug 2019 01:28:11 +0200 Subject: [PATCH] pcbnew: Clean up switch statement in launcher --- pcbnew/pcbnew.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/pcbnew/pcbnew.cpp b/pcbnew/pcbnew.cpp index aa1a40aed6..b2ebb44379 100644 --- a/pcbnew/pcbnew.cpp +++ b/pcbnew/pcbnew.cpp @@ -99,18 +99,12 @@ static struct IFACE : public KIFACE_I } case FRAME_PCB_MODULE_EDITOR: + return new FOOTPRINT_EDIT_FRAME( aKiway, aParent, + EDA_DRAW_PANEL_GAL::GAL_TYPE_UNKNOWN ); + case FRAME_PCB_MODULE_VIEWER: case FRAME_PCB_MODULE_VIEWER_MODAL: - { - switch( aClassId ) - { - case FRAME_PCB_MODULE_EDITOR: - return new FOOTPRINT_EDIT_FRAME( aKiway, aParent, EDA_DRAW_PANEL_GAL::GAL_TYPE_UNKNOWN ); - case FRAME_PCB_MODULE_VIEWER: - case FRAME_PCB_MODULE_VIEWER_MODAL: - return new FOOTPRINT_VIEWER_FRAME( aKiway, aParent, FRAME_T( aClassId ) ); - } - } + return new FOOTPRINT_VIEWER_FRAME( aKiway, aParent, FRAME_T( aClassId ) ); case FRAME_PCB_FOOTPRINT_WIZARD: return new FOOTPRINT_WIZARD_FRAME( aKiway, aParent, FRAME_T( aClassId ) );