From b39fece86a3919aff0872137ad0b8315e6f42ac5 Mon Sep 17 00:00:00 2001 From: Mark Date: Fri, 15 Sep 2017 15:53:20 +0200 Subject: [PATCH 1/5] Tweak sidbar size so text is not cut off CURA-4321 --- resources/themes/cura-light/theme.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 98626d3d45..8cec4d1d03 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -289,7 +289,7 @@ "extruder_button_material_margin": [0.70, 0.9], "extruder_button_material": [0.75, 0.75], - "sidebar": [32.0, 10.0], + "sidebar": [34.0, 10.0], "sidebar_margin": [1.71, 1.43], "sidebar_margin_thin": [0.71, 0.71], "sidebar_header": [0.0, 4.0], From 6484df3e60d194e0d31f7704865b552e50423591 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 15 Sep 2017 16:01:02 +0200 Subject: [PATCH 2/5] Install to correct site-packages on non-Debian computers Because dist-packages is a Debian thing only. Contributes to issue CURA-3368. --- CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7870759cd1..bea0092456 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,9 +45,15 @@ if(NOT APPLE AND NOT WIN32) DESTINATION ${CMAKE_INSTALL_BINDIR} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE RENAME cura) - install(DIRECTORY cura + if(EXISTS /etc/debian_version) + install(DIRECTORY cura DESTINATION lib/python${PYTHON_VERSION_MAJOR}/dist-packages FILES_MATCHING PATTERN *.py) + else() + install(DIRECTORY cura + DESTINATION lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/cura + FILES_MATCHING PATTERN *.py) + endif() install(FILES ${CMAKE_BINARY_DIR}/CuraVersion.py DESTINATION lib/python${PYTHON_VERSION_MAJOR}/dist-packages/cura) install(FILES ${CMAKE_BINARY_DIR}/cura.desktop From fa266969eb034a5e6a5a4895658540faa8de5948 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 15 Sep 2017 16:03:07 +0200 Subject: [PATCH 3/5] Don't install to /cura subdirectory of site-packages That's already done by the directory name itself. Contributes to issue CURA-3368. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bea0092456..36c4a1b1ce 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,7 +51,7 @@ if(NOT APPLE AND NOT WIN32) FILES_MATCHING PATTERN *.py) else() install(DIRECTORY cura - DESTINATION lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/cura + DESTINATION lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages FILES_MATCHING PATTERN *.py) endif() install(FILES ${CMAKE_BINARY_DIR}/CuraVersion.py From e8691d29a7f45bd73dd22e0a8b3161fde7a1795d Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 15 Sep 2017 16:05:10 +0200 Subject: [PATCH 4/5] Install CuraVersion.py also to site-packages on non-Debian Similar to the rest of Cura. Contributes to issue CURA-3368. --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 36c4a1b1ce..1c372ffa55 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,13 +49,15 @@ if(NOT APPLE AND NOT WIN32) install(DIRECTORY cura DESTINATION lib/python${PYTHON_VERSION_MAJOR}/dist-packages FILES_MATCHING PATTERN *.py) + install(FILES ${CMAKE_BINARY_DIR}/CuraVersion.py + DESTINATION lib/python${PYTHON_VERSION_MAJOR}/dist-packages/cura) else() install(DIRECTORY cura DESTINATION lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages FILES_MATCHING PATTERN *.py) + install(FILES ${CMAKE_BINARY_DIR}/CuraVersion.py + DESTINATION lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/cura) endif() - install(FILES ${CMAKE_BINARY_DIR}/CuraVersion.py - DESTINATION lib/python${PYTHON_VERSION_MAJOR}/dist-packages/cura) install(FILES ${CMAKE_BINARY_DIR}/cura.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications) install(FILES ${CMAKE_SOURCE_DIR}/resources/images/cura-icon.png From f139bbe3f1cee2be091380dd855b932573f0d2e3 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Fri, 15 Sep 2017 16:05:24 +0200 Subject: [PATCH 5/5] Fixed some missed references to the previous variables - CURA-4232 --- cura/PrintInformation.py | 2 +- plugins/SliceInfoPlugin/SliceInfo.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cura/PrintInformation.py b/cura/PrintInformation.py index 209d95d616..155d0a6d02 100644 --- a/cura/PrintInformation.py +++ b/cura/PrintInformation.py @@ -101,7 +101,7 @@ class PrintInformation(QObject): self._print_time_message_values = {} # Full fill message values using keys from _print_time_message_translations - for key in sorted(self._print_time_message_translations.keys()): + for key in self._print_time_message_translations.keys(): self._print_time_message_values[key] = Duration(None, self) diff --git a/plugins/SliceInfoPlugin/SliceInfo.py b/plugins/SliceInfoPlugin/SliceInfo.py index 09373d0c2f..a4859f6d7f 100755 --- a/plugins/SliceInfoPlugin/SliceInfo.py +++ b/plugins/SliceInfoPlugin/SliceInfo.py @@ -162,7 +162,7 @@ class SliceInfo(Extension): data["models"].append(model) - print_times = print_information.printTimesPerFeature + print_times = print_information._print_time_message_values data["print_times"] = {"travel": int(print_times["travel"].getDisplayString(DurationFormat.Format.Seconds)), "support": int(print_times["support"].getDisplayString(DurationFormat.Format.Seconds)), "infill": int(print_times["infill"].getDisplayString(DurationFormat.Format.Seconds)),