Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaid <daid303@gmail.com>2015-01-02 16:04:08 +0300
committerdaid <daid303@gmail.com>2015-01-02 16:04:08 +0300
commit1e366958826e05e140cf7624dfc42f3853cca189 (patch)
treec52a12919767aaa4be73496c84464fded8f101f3
parent03f4bb87f5e9678f2d02a413779846d0f64ded93 (diff)
Fix user defined quickprint profiles.15.01-RC6
-rw-r--r--Cura/util/resources.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Cura/util/resources.py b/Cura/util/resources.py
index 0259ef97f6..305cc4b174 100644
--- a/Cura/util/resources.py
+++ b/Cura/util/resources.py
@@ -53,14 +53,18 @@ def getSimpleModeProfiles():
path = os.path.normpath(os.path.join(resourceBasePath, 'quickprint', 'profiles', '*.ini'))
user_path = os.path.normpath(os.path.expanduser(os.path.join('~', '.Cura', 'quickprint', 'profiles')))
if os.path.isdir(user_path):
- return sorted(glob.glob(user_path))
+ files = sorted(glob.glob(os.path.join(user_path, '*.ini')))
+ if len(files) > 0:
+ return files
return sorted(glob.glob(path))
def getSimpleModeMaterials():
path = os.path.normpath(os.path.join(resourceBasePath, 'quickprint', 'materials', '*.ini'))
user_path = os.path.normpath(os.path.expanduser(os.path.join('~', '.Cura', 'quickprint', 'materials')))
if os.path.isdir(user_path):
- return sorted(glob.glob(user_path))
+ files = sorted(glob.glob(os.path.join(user_path, '*.ini')))
+ if len(files) > 0:
+ return files
return sorted(glob.glob(path))
def setupLocalization(selectedLanguage = None):