From 899afa1e90610a6e39b715f71f0acdb527f12e1c Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 27 Jan 2018 18:11:56 +0000 Subject: [PATCH] Reinstate OSX cursor shape selection Mark it as not supported in Legacy graphics. Fixes: lp:1745097 * https://bugs.launchpad.net/kicad/+bug/1745097 --- common/draw_frame.cpp | 3 --- cvpcb/class_DisplayFootprintsFrame.cpp | 7 ++++++- eeschema/tool_lib.cpp | 7 ++++++- eeschema/tool_sch.cpp | 7 ++++++- gerbview/toolbars_gerber.cpp | 7 ++++++- pcbnew/tool_modedit.cpp | 7 ++++++- pcbnew/tool_pcb.cpp | 7 ++++++- 7 files changed, 36 insertions(+), 9 deletions(-) diff --git a/common/draw_frame.cpp b/common/draw_frame.cpp index 0b1e034212..f4ea7f3ae6 100644 --- a/common/draw_frame.cpp +++ b/common/draw_frame.cpp @@ -113,10 +113,7 @@ BEGIN_EVENT_TABLE( EDA_DRAW_FRAME, KIWAY_PLAYER ) EVT_TOOL_RANGE( ID_TB_OPTIONS_SELECT_UNIT_MM, ID_TB_OPTIONS_SELECT_UNIT_INCH, EDA_DRAW_FRAME::OnSelectUnits ) - // Cursor shape cannot be implemented on OS X -#ifndef __APPLE__ EVT_TOOL( ID_TB_OPTIONS_SELECT_CURSOR, EDA_DRAW_FRAME::OnToggleCrossHairStyle ) -#endif // !__APPLE__ EVT_UPDATE_UI( wxID_UNDO, EDA_DRAW_FRAME::OnUpdateUndo ) EVT_UPDATE_UI( wxID_REDO, EDA_DRAW_FRAME::OnUpdateRedo ) diff --git a/cvpcb/class_DisplayFootprintsFrame.cpp b/cvpcb/class_DisplayFootprintsFrame.cpp index 57c072c210..e50dfd41d1 100644 --- a/cvpcb/class_DisplayFootprintsFrame.cpp +++ b/cvpcb/class_DisplayFootprintsFrame.cpp @@ -193,7 +193,12 @@ void DISPLAY_FOOTPRINTS_FRAME::ReCreateOptToolbar() m_optionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString, KiBitmap( cursor_shape_xpm ), _( "Change cursor shape" ), wxITEM_CHECK ); -#endif // !__APPLE__ +#else + m_optionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString, + KiBitmap( cursor_shape_xpm ), + _( "Change cursor shape (not supported in Legacy graphics)" ), + wxITEM_CHECK ); +#endif m_optionsToolBar->AddSeparator(); m_optionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_PADS_SKETCH, wxEmptyString, diff --git a/eeschema/tool_lib.cpp b/eeschema/tool_lib.cpp index eb9b8a1c3b..f3d128cfcf 100644 --- a/eeschema/tool_lib.cpp +++ b/eeschema/tool_lib.cpp @@ -241,7 +241,12 @@ void LIB_EDIT_FRAME::ReCreateOptToolbar() m_optionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString, KiScaledBitmap( cursor_shape_xpm, this ), _( "Change cursor shape" ), wxITEM_CHECK ); -#endif // !__APPLE__ +#else + m_optionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString, + KiScaledBitmap( cursor_shape_xpm, this ), + _( "Change cursor shape (not supported in Legacy graphics)" ), + wxITEM_CHECK ); +#endif m_optionsToolBar->AddTool( ID_LIBEDIT_SHOW_ELECTRICAL_TYPE, wxEmptyString, KiScaledBitmap( pin_show_etype_xpm, this ), diff --git a/eeschema/tool_sch.cpp b/eeschema/tool_sch.cpp index 9f969194c4..ae6d9fca89 100644 --- a/eeschema/tool_sch.cpp +++ b/eeschema/tool_sch.cpp @@ -299,7 +299,12 @@ void SCH_EDIT_FRAME::ReCreateOptToolbar() m_optionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString, KiScaledBitmap( cursor_shape_xpm, this ), _( "Change cursor shape" ), wxITEM_CHECK ); -#endif // !__APPLE__ +#else + m_optionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString, + KiScaledBitmap( cursor_shape_xpm, this ), + _( "Change cursor shape (not supported in Legacy graphics)" ), + wxITEM_CHECK ); +#endif //KiScaledSeparator( m_optionsToolBar, this ); m_optionsToolBar->AddTool( ID_TB_OPTIONS_HIDDEN_PINS, wxEmptyString, diff --git a/gerbview/toolbars_gerber.cpp b/gerbview/toolbars_gerber.cpp index df081d123e..ee40aa8577 100644 --- a/gerbview/toolbars_gerber.cpp +++ b/gerbview/toolbars_gerber.cpp @@ -248,7 +248,12 @@ void GERBVIEW_FRAME::ReCreateOptToolbar( void ) m_optionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString, KiScaledBitmap( cursor_shape_xpm, this ), _( "Change cursor shape" ), wxITEM_CHECK ); -#endif // !__APPLE__ +#else + m_optionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString, + KiScaledBitmap( cursor_shape_xpm, this ), + _( "Change cursor shape (not supported in Legacy graphics)" ), + wxITEM_CHECK ); +#endif KiScaledSeparator( m_mainToolBar, this ); m_optionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_FLASHED_ITEMS_SKETCH, wxEmptyString, diff --git a/pcbnew/tool_modedit.cpp b/pcbnew/tool_modedit.cpp index 05178bba81..d76bda4ba0 100644 --- a/pcbnew/tool_modedit.cpp +++ b/pcbnew/tool_modedit.cpp @@ -231,7 +231,12 @@ void FOOTPRINT_EDIT_FRAME::ReCreateOptToolbar() m_optionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString, KiScaledBitmap( cursor_shape_xpm, this ), _( "Change Cursor Shape" ), wxITEM_CHECK ); -#endif // !__APPLE__ +#else + m_optionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString, + KiScaledBitmap( cursor_shape_xpm, this ), + _( "Change cursor shape (not supported in Legacy graphics)" ), + wxITEM_CHECK ); +#endif KiScaledSeparator( m_optionsToolBar, this ); m_optionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_PADS_SKETCH, wxEmptyString, diff --git a/pcbnew/tool_pcb.cpp b/pcbnew/tool_pcb.cpp index 473d27390f..51f4d1813f 100644 --- a/pcbnew/tool_pcb.cpp +++ b/pcbnew/tool_pcb.cpp @@ -379,7 +379,12 @@ void PCB_EDIT_FRAME::ReCreateOptToolbar() m_optionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString, KiScaledBitmap( cursor_shape_xpm, this ), _( "Change cursor shape" ), wxITEM_CHECK ); -#endif // !__APPLE__ +#else + m_optionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString, + KiScaledBitmap( cursor_shape_xpm, this ), + _( "Change cursor shape (not supported in Legacy graphics)" ), + wxITEM_CHECK ); +#endif KiScaledSeparator( m_optionsToolBar, this ); m_optionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_RATSNEST, wxEmptyString,