From 445bc753193e779ffab6ab4d456e8c97beba6019 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Sat, 21 Mar 2020 16:19:55 -0400 Subject: [PATCH] 3D Viewer: fix broken check for write image permission check. Fixes https://gitlab.com/kicad/code/kicad/issues/4081 (cherry picked from commit d8e99dc5be319b9eb3adf49d531b4e299ad57539) --- 3d-viewer/3d_viewer/eda_3d_viewer.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/3d-viewer/3d_viewer/eda_3d_viewer.cpp b/3d-viewer/3d_viewer/eda_3d_viewer.cpp index 91dccbea88..a5cf6ea2e0 100644 --- a/3d-viewer/3d_viewer/eda_3d_viewer.cpp +++ b/3d-viewer/3d_viewer/eda_3d_viewer.cpp @@ -22,11 +22,12 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -/** - * @file eda_3d_viewer.cpp - * @brief Implements a 3d viewer windows GUI - */ - +#include +#include +#include +#include +#include +#include #include "eda_3d_viewer.h" #include "../3d_viewer_id.h" @@ -990,7 +991,9 @@ void EDA_3D_VIEWER::takeScreenshot( wxCommandEvent& event ) fullFileName = m_defaultSaveScreenshotFileName.GetFullPath(); - if( !wxFileName::IsFileWritable( fullFileName ) ) + wxFileName fn = fullFileName; + + if( !fn.IsDirWritable() ) { wxString msg;