From 6484df3e60d194e0d31f7704865b552e50423591 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 15 Sep 2017 16:01:02 +0200 Subject: [PATCH 1/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 2/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 3/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 4/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)), From 37869a8b14c4505ac4f7d3bf61f20532d09fbe7d Mon Sep 17 00:00:00 2001 From: alekseisasin Date: Fri, 15 Sep 2017 16:36:00 +0200 Subject: [PATCH 5/5] Removed unused code. Shifted the last print quality number a bit to the left CURA-4182 --- resources/qml/SidebarSimple.qml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index bbfd8a424a..a219789c3c 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -349,23 +349,12 @@ Item } else if (i == total_tick_count - 1) { - start_x = current_start_x - offset * 2; + start_x = current_start_x - offset * 2.5; } ctx.fillText(resolutionSlider.model.getItem(i).layer_height_without_unit, start_x, text_top); current_start_x += step_size; } - - // print currently selected quality text - if (resolutionSlider.showQualityText && resolutionSlider.currentQualityIndex != undefine) - { - const text_top = parent.height / 2 + tick_height + tick_text_height * 2; - total_tick_count = resolutionSlider.totalTickCount; - const step_size = resolutionSlider.tickStepSize; - current_start_x = (tick_left_right_margin) + step_size * (resolutionSlider.currentQualityIndex - resolutionSlider.fullRangeMin); - ctx.fillStyle = UM.Theme.getColor("quality_slider_text"); - ctx.fillText(resolutionSlider.model.getItem(resolutionSlider.currentQualityIndex).name, current_start_x - 6, text_top); - } } MouseArea