kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #27284
[PATCH] Make doc extension (pdf) are not case sensitive.
By default in Linux, KiCad opens pdf-files in GIMP (on my system), so I
setup it to open pdf with another app and it works if extension of the doc
in lower case (pdf). But if extension in upper case (PDF), KiCad still
opens it in GIMP.
In attachment the patch that resolves this issue.
From 0142a5609e6086fcd15469ec4760f0d4054cf067 Mon Sep 17 00:00:00 2001
From: Baranovskiy Konstantin <baranovskiykonstantin@xxxxxxxxx>
Date: Sun, 22 Jan 2017 16:28:57 +0200
Subject: [PATCH] Make doc extension (pdf) are not case sensitive.
---
common/eda_doc.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/eda_doc.cpp b/common/eda_doc.cpp
index d94d00c6e..951cc9aa5 100644
--- a/common/eda_doc.cpp
+++ b/common/eda_doc.cpp
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2014 Jean-Pierre Charras, jp.charras at wanadoo.fr
- * Copyright (C) 2014 KiCad Developers, see CHANGELOG.TXT for contributors.
+ * Copyright (C) 2017 KiCad Developers, see CHANGELOG.TXT for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -166,7 +166,7 @@ bool GetAssociatedDocument( wxWindow* aParent,
wxString file_ext = currentFileName.GetExt();
- if( file_ext == wxT( "pdf" ) )
+ if( file_ext.Lower() == wxT( "pdf" ) )
{
success = OpenPDF( fullfilename );
return success;
--
2.11.0
Follow ups