Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer
This commit is contained in:
commit
411159b5e7
57 changed files with 2971 additions and 2371 deletions
75
resources/icons/notification_eject_sd.svg
Normal file
75
resources/icons/notification_eject_sd.svg
Normal file
|
@ -0,0 +1,75 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
version="1.1"
|
||||||
|
id="Layer_1"
|
||||||
|
x="0px"
|
||||||
|
y="0px"
|
||||||
|
viewBox="0 0 800 800"
|
||||||
|
style="enable-background:new 0 0 800 800;"
|
||||||
|
xml:space="preserve"
|
||||||
|
sodipodi:docname="notification_eject_sd_hover.svg"
|
||||||
|
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"><metadata
|
||||||
|
id="metadata15"><rdf:RDF><cc:Work
|
||||||
|
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
|
||||||
|
id="defs13" /><sodipodi:namedview
|
||||||
|
inkscape:document-rotation="0"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1"
|
||||||
|
objecttolerance="10"
|
||||||
|
gridtolerance="10"
|
||||||
|
guidetolerance="10"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:window-width="3840"
|
||||||
|
inkscape:window-height="2066"
|
||||||
|
id="namedview11"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="1.26"
|
||||||
|
inkscape:cx="400"
|
||||||
|
inkscape:cy="396.42857"
|
||||||
|
inkscape:window-x="-11"
|
||||||
|
inkscape:window-y="-11"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="Layer_1" />
|
||||||
|
<style
|
||||||
|
type="text/css"
|
||||||
|
id="style2">
|
||||||
|
.st0{fill:#ED6B21;}
|
||||||
|
</style>
|
||||||
|
<path
|
||||||
|
style="stroke-width:0.85"
|
||||||
|
class="st0"
|
||||||
|
d="m 565.50264,534.98775 v 60.775 h -330.565 v -60.775 h 330.565 m 27.88,-48.195 h -386.24 c -11.22,0 -20.315,9.095 -20.315,20.315 v 116.535 c 0,11.22 9.095,20.315 20.315,20.315 h 386.24 c 11.22,0 20.315,-9.095 20.315,-20.315 v -116.45 c 0,-11.22 -9.095,-20.4 -20.315,-20.4 z"
|
||||||
|
id="path4" />
|
||||||
|
<path
|
||||||
|
style="stroke-width:0.85"
|
||||||
|
class="st0"
|
||||||
|
d="m 400.09264,235.70275 116.96,155.295 h -233.75 l 116.79,-155.295 m 0,-66.64 c -6.12,0 -12.155,2.72 -16.235,8.16 l -172.635,229.5 c -10.115,13.43 -0.51,32.555 16.235,32.555 h 345.355 c 16.745,0 26.35,-19.125 16.235,-32.555 l -172.805,-229.5 c -3.995,-5.44 -10.03,-8.16 -16.15,-8.16 z"
|
||||||
|
id="path6" />
|
||||||
|
<g
|
||||||
|
id="g4"
|
||||||
|
transform="matrix(0.9775,0,0,0.9775,53.547,53.54775)">
|
||||||
|
<path
|
||||||
|
id="path2"
|
||||||
|
class="st0"
|
||||||
|
d="M 597.2,701.3 H 110.6 C 53.2,701.3 6.5,654.6 6.5,597.2 V 110.6 C 6.5,53.2 53.2,6.5 110.6,6.5 h 486.6 c 57.4,0 104.1,46.7 104.1,104.1 v 486.6 c 0,57.4 -46.7,104.1 -104.1,104.1 z M 110.6,52.4 c -32,0 -58.2,26 -58.2,58.2 v 486.6 c 0,32 26,58.2 58.2,58.2 h 486.6 c 32,0 58.2,-26 58.2,-58.2 V 110.6 c 0,-32 -26,-58.2 -58.2,-58.2 z" />
|
||||||
|
</g>
|
||||||
|
<path
|
||||||
|
style="fill:#ed6b21;fill-opacity:1;stroke-width:0.674603"
|
||||||
|
d="m 150.65676,738.12999 c -12.4717,-1.39663 -26.66772,-5.94192 -37.84321,-12.11671 -17.754551,-9.80992 -33.768844,-26.68981 -42.418124,-44.71089 -5.985061,-12.4701 -8.760227,-23.35456 -9.821918,-38.52249 -0.48061,-6.8663 -0.640464,-87.42616 -0.497289,-250.61508 0.195544,-222.88027 0.294923,-240.94223 1.356742,-246.58759 4.2349,-22.51562 13.68014,-40.62012 29.200931,-55.97194 14.237938,-14.082924 31.958648,-23.427941 52.602238,-27.739791 5.87892,-1.227937 14.00696,-1.268146 256.3492,-1.268146 h 250.27778 l 7.08334,1.561512 c 21.30688,4.697075 36.90336,13.216072 51.96052,28.381502 14.67865,14.784203 23.1932,30.350373 27.76125,50.752683 l 1.56791,7.00271 v 250.95239 c 0,242.72256 -0.0418,251.15149 -1.26428,257.0238 -9.30592,44.69034 -45.18963,77.43352 -89.75566,81.90028 -9.17898,0.92002 -488.33076,0.87927 -496.55943,-0.0425 z M 652.87275,692.49 c 19.93824,-6.17834 34.6922,-21.42493 40.00111,-41.33675 l 1.51306,-5.67494 V 399.58544 153.69259 l -1.52571,-5.73412 c -5.66288,-21.28292 -21.4158,-36.89778 -42.2051,-41.83523 -5.63965,-1.33941 -7.66026,-1.3488 -253.17948,-1.17613 l -247.49447,0.17405 -4.72222,1.5953 c -18.05932,6.10093 -31.7315,19.23923 -37.4918,36.0278 -1.04762,3.05333 -2.22128,7.52472 -2.60813,9.93642 -0.47859,2.9836 -0.705,81.91876 -0.70847,246.99889 -0.005,218.14117 0.10226,243.1829 1.05916,248.25397 4.27172,22.63802 22.24346,40.86392 44.80877,45.4425 3.58848,0.72811 49.16893,0.87009 250.95237,0.78171 l 246.56747,-0.10801 z"
|
||||||
|
id="path17" /><path
|
||||||
|
style="fill:#ed6b21;fill-opacity:1;stroke-width:0.674603"
|
||||||
|
d="m 218.59688,436.65333 c -4.13129,-2.06443 -6.86895,-4.83026 -9.31331,-9.40915 -1.8345,-3.43648 -1.79343,-12.82008 0.0723,-16.52778 1.6224,-3.22405 174.17376,-232.72362 177.28101,-235.79015 3.40221,-3.35765 7.0012,-4.88322 12.34326,-5.23218 4.15899,-0.27168 5.32913,-0.0718 8.86231,1.51379 2.23886,1.00474 4.97342,2.78734 6.07682,3.96132 4.02813,4.28582 175.25817,232.2757 176.9048,235.54571 2.34584,4.65861 2.38759,12.10251 0.0927,16.52929 -2.00877,3.87485 -5.74351,7.80536 -9.18863,9.67026 l -2.69841,1.4607 -178.1462,0.17362 -178.14619,0.17362 z m 298.67589,-45.66907 c -0.0611,-1.0035 -116.48775,-154.99008 -117.18534,-154.99008 -0.71184,0 -116.84805,154.02591 -116.8632,154.99008 -0.004,0.27827 52.6617,0.50595 117.03571,0.50595 64.374,0 117.02978,-0.22768 117.01283,-0.50595 z"
|
||||||
|
id="path19" /><path
|
||||||
|
style="fill:#ed6b21;fill-opacity:1;stroke-width:0.674603"
|
||||||
|
d="m 202.23056,642.87591 c -4.08272,-1.10499 -7.53117,-3.30912 -10.37477,-6.63124 -4.63948,-5.42019 -4.43387,-2.10678 -4.42657,-71.33297 l 0.007,-62.44927 1.60268,-3.44194 c 1.88877,-4.05635 5.3977,-7.75734 9.36436,-9.8769 l 2.84915,-1.52243 h 199.00794 199.00793 l 2.84915,1.52243 c 3.96665,2.11956 7.47559,5.82055 9.36436,9.8769 l 1.60267,3.44194 0.007,62.44927 c 0.008,69.78764 0.26152,65.98231 -4.79028,71.72146 -1.4904,1.69319 -4.37627,3.87229 -6.52672,4.9283 l -3.85513,1.89304 -196.30953,0.12602 c -153.67069,0.0987 -196.97613,-0.0544 -199.37859,-0.70461 z M 565.87502,565.20052 V 534.50608 H 400.25994 234.64486 v 30.69444 30.69446 h 165.61508 165.61508 z"
|
||||||
|
id="path21" /></svg>
|
After Width: | Height: | Size: 5.7 KiB |
76
resources/icons/notification_eject_sd_hover.svg
Normal file
76
resources/icons/notification_eject_sd_hover.svg
Normal file
|
@ -0,0 +1,76 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
version="1.1"
|
||||||
|
id="Layer_1"
|
||||||
|
x="0px"
|
||||||
|
y="0px"
|
||||||
|
viewBox="0 0 800 800"
|
||||||
|
style="enable-background:new 0 0 800 800;"
|
||||||
|
xml:space="preserve"
|
||||||
|
sodipodi:docname="notification_eject_sd.svg"
|
||||||
|
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"><metadata
|
||||||
|
id="metadata15"><rdf:RDF><cc:Work
|
||||||
|
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
|
||||||
|
id="defs13" /><sodipodi:namedview
|
||||||
|
inkscape:document-rotation="0"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1"
|
||||||
|
objecttolerance="10"
|
||||||
|
gridtolerance="10"
|
||||||
|
guidetolerance="10"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:window-width="1918"
|
||||||
|
inkscape:window-height="2054"
|
||||||
|
id="namedview11"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="1.26"
|
||||||
|
inkscape:cx="400"
|
||||||
|
inkscape:cy="401.5873"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="0"
|
||||||
|
inkscape:current-layer="Layer_1" />
|
||||||
|
<style
|
||||||
|
type="text/css"
|
||||||
|
id="style2">
|
||||||
|
.st0{fill:#ED6B21;}
|
||||||
|
</style>
|
||||||
|
<path
|
||||||
|
class="st0"
|
||||||
|
d="M594.8,558.9v71.5H205.9v-71.5H594.8 M627.6,502.2H173.2c-13.2,0-23.9,10.7-23.9,23.9v137.1 c0,13.2,10.7,23.9,23.9,23.9h454.4c13.2,0,23.9-10.7,23.9-23.9V526.2C651.5,513,640.8,502.2,627.6,502.2L627.6,502.2z"
|
||||||
|
id="path4" />
|
||||||
|
<path
|
||||||
|
class="st0"
|
||||||
|
d="M400.2,206.8l137.6,182.7h-275L400.2,206.8 M400.2,128.4c-7.2,0-14.3,3.2-19.1,9.6l-203.1,270 c-11.9,15.8-0.6,38.3,19.1,38.3h406.3c19.7,0,31-22.5,19.1-38.3l-203.3-270C414.5,131.6,407.4,128.4,400.2,128.4L400.2,128.4z"
|
||||||
|
id="path6" />
|
||||||
|
<g
|
||||||
|
id="g4"
|
||||||
|
transform="matrix(1.15,0,0,1.15,-7.50075,-7.5)">
|
||||||
|
<path
|
||||||
|
id="path2"
|
||||||
|
class="st0"
|
||||||
|
d="M597.2,701.3H110.6c-57.4,0-104.1-46.7-104.1-104.1V110.6C6.5,53.2,53.2,6.5,110.6,6.5h486.6 c57.4,0,104.1,46.7,104.1,104.1v486.6C701.3,654.6,654.6,701.3,597.2,701.3z M110.6,52.4c-32,0-58.2,26-58.2,58.2v486.6 c0,32,26,58.2,58.2,58.2h486.6c32,0,58.2-26,58.2-58.2V110.6c0-32-26-58.2-58.2-58.2L110.6,52.4z" />
|
||||||
|
</g>
|
||||||
|
<path
|
||||||
|
style="fill:#ed6b21;fill-opacity:1;stroke-width:0.793651"
|
||||||
|
d="M 107.81901,798.00119 C 77.966509,794.83135 49.146122,779.90354 30.060545,757.72544 16.219297,741.64143 7.2605087,723.64471 2.5844311,702.53048 L 0.79365079,694.44444 V 399.60317 104.7619 L 2.5707889,96.74281 C 8.1200484,71.702533 18.222321,53.056007 35.651802,35.682695 53.220959,18.170156 71.802034,8.0954675 96.708127,2.5778576 L 104.7619,0.79365079 h 294.44445 c 281.74132,0 294.75136,0.0623952 301.55851,1.44626191 16.67428,3.3898194 30.80854,9.2277743 44.45639,18.3620833 30.56319,20.455498 49.17772,51.734599 52.83931,88.789134 0.52246,5.28681 0.71992,107.13501 0.57277,295.37077 -0.21452,274.44189 -0.28952,287.63907 -1.67476,294.84127 -9.63677,50.10325 -47.25156,87.71807 -97.3554,97.35548 -7.21079,1.38698 -20.15876,1.45445 -296.82539,1.54754 -159.10715,0.0532 -291.83859,-0.17373 -294.95877,-0.505 z m 582.70983,-52.40653 c 14.11333,-2.49918 25.86756,-8.65506 36.13916,-18.92666 10.4238,-10.4238 16.61917,-22.37735 18.96341,-36.58863 0.59763,-3.62296 0.78014,-91.16224 0.61306,-294.04762 -0.2267,-275.2812 -0.30507,-289.11319 -1.66353,-293.6508 -2.29132,-7.653498 -8.052,-18.790275 -12.80623,-24.757484 -7.93878,-9.964272 -18.57499,-17.346949 -31.48512,-21.854079 l -7.43245,-2.594784 -291.12328,-0.20372 C 142.50327,52.78948 110.02937,52.90047 105.30529,53.98405 79.968659,59.795581 61.031339,78.238321 54.164726,103.78898 l -1.754497,6.52848 -0.240323,282.14286 c -0.151001,177.27655 0.04527,285.53516 0.528069,291.26984 2.318854,27.5434 19.073236,49.76542 44.524247,59.05433 10.087718,3.68173 -4.026285,3.51395 301.243128,3.58099 197.57151,0.0434 288.82563,-0.19746 292.06349,-0.77082 z"
|
||||||
|
id="path19" /><path
|
||||||
|
id="path12"
|
||||||
|
d="M 107.81901,798.00119 C 71.793616,794.17587 39.726024,774.51428 19.725029,743.98814 11.604149,731.59381 6.0410683,718.13847 2.5844311,702.53048 L 0.79365079,694.44444 V 399.20635 103.96825 L 3.035741,94.554887 C 8.7824143,70.427608 18.557382,52.794942 35.676163,35.676161 52.78713,18.565194 70.514246,8.724096 94.444444,3.0513179 l 9.523806,-2.25766869 h 294.84127 c 282.12524,0 295.14809,0.0623746 301.95534,1.44626189 16.66109,3.3871391 30.79289,9.2216269 44.45639,18.3543829 30.53954,20.412782 49.17677,51.732756 52.83931,88.796836 0.52246,5.28681 0.71992,107.13501 0.57277,295.37077 -0.21452,274.44188 -0.28952,287.63907 -1.67476,294.84127 -8.48938,44.13777 -38.62564,78.86883 -80.59962,92.88841 -19.37815,6.47239 11.16453,5.88739 -313.58117,6.0062 -159.10715,0.0579 -291.83859,-0.16532 -294.95877,-0.49659 z m 583.84766,-52.6969 c 13.48971,-2.42242 24.94716,-8.60413 35.32488,-19.05909 10.25229,-10.3286 16.66154,-22.92711 18.61985,-36.60068 0.66689,-4.65647 0.83196,-81.74243 0.62956,-294.0096 C 745.9846,126.77174 745.87745,107.60752 744.6044,102.9114 738.42079,80.100871 721.07257,62.283764 697.9879,55.03493 l -5.92441,-1.860328 H 399.20635 106.34921 L 98.809524,55.78721 C 75.623265,63.821579 59.178748,82.101475 53.902861,105.70593 52.59901,111.53938 52.514615,128.88593 52.47105,400 l -0.04629,288.09524 2.080286,7.60155 c 6.270993,22.91476 22.15377,39.95711 44.384633,47.62505 3.584011,1.23621 7.998091,1.91356 14.999211,2.30168 5.45635,0.30249 136.34921,0.59491 290.87301,0.64982 232.38849,0.0826 281.98128,-0.0849 286.90477,-0.96905 z"
|
||||||
|
style="fill:#ed6b21;fill-opacity:1;stroke-width:0.793651" /><path
|
||||||
|
id="path14"
|
||||||
|
d="m 188.74939,444.33528 c -4.767,-1.68913 -10.12828,-6.7592 -12.71276,-12.02223 -2.90908,-5.92405 -3.07868,-13.78271 -0.41474,-19.21781 1.59087,-3.24578 204.04455,-273.05533 208.24079,-277.52202 0.98764,-1.05129 4.03672,-3.01468 6.77574,-4.3631 4.52929,-2.22976 5.50158,-2.41761 10.74224,-2.07541 6.86047,0.44798 10.76603,2.25377 15.37601,7.10932 3.73681,3.93587 203.30677,268.8636 207.0044,274.79691 2.05716,3.30097 2.4722,4.84315 2.70946,10.06767 0.23771,5.23447 -0.0137,6.8089 -1.6588,10.38763 -2.76417,6.01319 -5.53229,8.93875 -11.0814,11.71167 l -4.85687,2.42701 -208.40498,-0.0627 c -181.84257,-0.0547 -208.82739,-0.21233 -211.71909,-1.23698 z m 348.94902,-54.98925 c 0,-0.9027 -136.36908,-182.10669 -137.30528,-182.44799 -0.54415,-0.19837 -135.36926,178.28524 -137.53574,182.07198 -0.54249,0.9482 19.37332,1.10934 137.10317,1.10934 83.74346,0 137.73785,-0.28747 137.73785,-0.73333 z"
|
||||||
|
style="fill:#ed6b21;fill-opacity:1;stroke-width:0.793651" /><path
|
||||||
|
id="path16"
|
||||||
|
d="m 168.25397,686.16973 c -7.05465,-1.71645 -13.06577,-6.58064 -16.33102,-13.21504 L 150,669.04762 v -74.20635 -74.20635 l 1.8935,-4.19003 c 1.12593,-2.49152 3.46026,-5.59868 5.75857,-7.66505 7.33695,-6.59655 -16.73947,-6.00214 243.08455,-6.00144 l 231.80306,6.3e-4 4.76912,2.2562 c 5.31341,2.5137 9.30333,6.56248 11.81369,11.98794 1.66145,3.59075 1.67116,4.0432 1.67116,77.8181 v 74.20635 l -1.92294,3.90707 c -2.44721,4.97227 -6.5951,9.12016 -11.60261,11.6026 l -3.93477,1.95064 -231.3492,0.12055 c -127.24207,0.0663 -232.42064,-0.14013 -233.73016,-0.45875 z m 426.5873,-91.72529 V 558.33333 H 400 205.15873 v 36.11111 36.11111 H 400 594.84127 Z"
|
||||||
|
style="fill:#ed6b21;fill-opacity:1;stroke-width:0.793651" /></svg>
|
After Width: | Height: | Size: 7.3 KiB |
File diff suppressed because it is too large
Load diff
|
@ -1,4 +1,5 @@
|
||||||
min_slic3r_version = 2.3.0-alpha2
|
min_slic3r_version = 2.3.0-alpha2
|
||||||
|
0.0.3 Fixed infill_overlap, start_gcode, end_gcode for Anycubic Predator
|
||||||
0.0.2 Added Anycubic Predator
|
0.0.2 Added Anycubic Predator
|
||||||
min_slic3r_version = 2.3.0-alpha0
|
min_slic3r_version = 2.3.0-alpha0
|
||||||
0.0.1 Initial Version
|
0.0.1 Initial Version
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,5 @@
|
||||||
min_slic3r_version = 2.3.0-alpha2
|
min_slic3r_version = 2.3.0-alpha2
|
||||||
|
0.0.5 Added 0.08mm SUPERDETAIL and 0.28mm SUPERDRAFT print profiles. Updated OPTIMAL print profile.
|
||||||
0.0.4 Added initial CR-10 profile, end g-code improvements.
|
0.0.4 Added initial CR-10 profile, end g-code improvements.
|
||||||
min_slic3r_version = 2.3.0-alpha0
|
min_slic3r_version = 2.3.0-alpha0
|
||||||
0.0.3 Added Ender-2, Ender-3 BLTouch, updated Ender-3 bed texture.
|
0.0.3 Added Ender-2, Ender-3 BLTouch, updated Ender-3 bed texture.
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
name = Creality
|
name = Creality
|
||||||
# Configuration version of this file. Config file will only be installed, if the config_version differs.
|
# Configuration version of this file. Config file will only be installed, if the config_version differs.
|
||||||
# This means, the server may force the PrusaSlicer configuration to be downgraded.
|
# This means, the server may force the PrusaSlicer configuration to be downgraded.
|
||||||
config_version = 0.0.4
|
config_version = 0.0.5
|
||||||
# Where to get the updates from?
|
# Where to get the updates from?
|
||||||
config_update_url = https://files.prusa3d.com/wp-content/uploads/repository/PrusaSlicer-settings-master/live/Creality/
|
config_update_url = https://files.prusa3d.com/wp-content/uploads/repository/PrusaSlicer-settings-master/live/Creality/
|
||||||
# changelog_url = https://files.prusa3d.com/?latest=slicer-profiles&lng=%1%
|
# changelog_url = https://files.prusa3d.com/?latest=slicer-profiles&lng=%1%
|
||||||
|
@ -260,6 +260,13 @@ wipe_tower_x = 170
|
||||||
wipe_tower_y = 140
|
wipe_tower_y = 140
|
||||||
xy_size_compensation = 0
|
xy_size_compensation = 0
|
||||||
|
|
||||||
|
[print:*0.08mm*]
|
||||||
|
inherits = *common*
|
||||||
|
layer_height = 0.08
|
||||||
|
perimeters = 3
|
||||||
|
bottom_solid_layers = 9
|
||||||
|
top_solid_layers = 11
|
||||||
|
|
||||||
[print:*0.10mm*]
|
[print:*0.10mm*]
|
||||||
inherits = *common*
|
inherits = *common*
|
||||||
layer_height = 0.1
|
layer_height = 0.1
|
||||||
|
@ -274,9 +281,9 @@ perimeters = 3
|
||||||
bottom_solid_layers = 6
|
bottom_solid_layers = 6
|
||||||
top_solid_layers = 7
|
top_solid_layers = 7
|
||||||
|
|
||||||
[print:*0.15mm*]
|
[print:*0.16mm*]
|
||||||
inherits = *common*
|
inherits = *common*
|
||||||
layer_height = 0.15
|
layer_height = 0.16
|
||||||
bottom_solid_layers = 5
|
bottom_solid_layers = 5
|
||||||
top_solid_layers = 7
|
top_solid_layers = 7
|
||||||
|
|
||||||
|
@ -293,6 +300,17 @@ top_infill_extrusion_width = 0.45
|
||||||
bottom_solid_layers = 3
|
bottom_solid_layers = 3
|
||||||
top_solid_layers = 4
|
top_solid_layers = 4
|
||||||
|
|
||||||
|
[print:*0.28mm*]
|
||||||
|
inherits = *common*
|
||||||
|
layer_height = 0.28
|
||||||
|
top_infill_extrusion_width = 0.45
|
||||||
|
bottom_solid_layers = 3
|
||||||
|
top_solid_layers = 4
|
||||||
|
|
||||||
|
[print:0.08mm SUPERDETAIL @CREALITY]
|
||||||
|
inherits = *0.08mm*
|
||||||
|
compatible_printers_condition = printer_model=~/(ENDER|CR).*/ and nozzle_diameter[0]==0.4
|
||||||
|
|
||||||
[print:0.10mm HIGHDETAIL @CREALITY]
|
[print:0.10mm HIGHDETAIL @CREALITY]
|
||||||
inherits = *0.10mm*
|
inherits = *0.10mm*
|
||||||
renamed_from = "0.10mm HIGHDETAIL @ENDER3"
|
renamed_from = "0.10mm HIGHDETAIL @ENDER3"
|
||||||
|
@ -303,9 +321,9 @@ inherits = *0.12mm*
|
||||||
renamed_from = "0.12mm DETAIL @ENDER3"
|
renamed_from = "0.12mm DETAIL @ENDER3"
|
||||||
compatible_printers_condition = printer_model=~/(ENDER|CR).*/ and nozzle_diameter[0]==0.4
|
compatible_printers_condition = printer_model=~/(ENDER|CR).*/ and nozzle_diameter[0]==0.4
|
||||||
|
|
||||||
[print:0.15mm OPTIMAL @CREALITY]
|
[print:0.16mm OPTIMAL @CREALITY]
|
||||||
inherits = *0.15mm*
|
inherits = *0.16mm*
|
||||||
renamed_from = "0.15mm OPTIMAL @ENDER3"
|
renamed_from = "0.15mm OPTIMAL @ENDER3"; "0.15mm OPTIMAL @CREALITY"
|
||||||
compatible_printers_condition = printer_model=~/(ENDER|CR).*/ and nozzle_diameter[0]==0.4
|
compatible_printers_condition = printer_model=~/(ENDER|CR).*/ and nozzle_diameter[0]==0.4
|
||||||
|
|
||||||
[print:0.20mm NORMAL @CREALITY]
|
[print:0.20mm NORMAL @CREALITY]
|
||||||
|
@ -318,6 +336,10 @@ inherits = *0.24mm*
|
||||||
renamed_from = "0.24mm DRAFT @ENDER3"
|
renamed_from = "0.24mm DRAFT @ENDER3"
|
||||||
compatible_printers_condition = printer_model=~/(ENDER|CR).*/ and nozzle_diameter[0]==0.4
|
compatible_printers_condition = printer_model=~/(ENDER|CR).*/ and nozzle_diameter[0]==0.4
|
||||||
|
|
||||||
|
[print:0.28mm SUPERDRAFT @CREALITY]
|
||||||
|
inherits = *0.28mm*
|
||||||
|
compatible_printers_condition = printer_model=~/(ENDER|CR).*/ and nozzle_diameter[0]==0.4
|
||||||
|
|
||||||
# Common filament preset
|
# Common filament preset
|
||||||
[filament:*common*]
|
[filament:*common*]
|
||||||
cooling = 0
|
cooling = 0
|
||||||
|
@ -342,15 +364,15 @@ filament_max_volumetric_speed = 15
|
||||||
filament_type = PLA
|
filament_type = PLA
|
||||||
filament_density = 1.24
|
filament_density = 1.24
|
||||||
filament_cost = 20
|
filament_cost = 20
|
||||||
first_layer_bed_temperature = 40
|
first_layer_bed_temperature = 60
|
||||||
first_layer_temperature = 215
|
first_layer_temperature = 205
|
||||||
fan_always_on = 1
|
fan_always_on = 1
|
||||||
cooling = 1
|
cooling = 1
|
||||||
max_fan_speed = 100
|
max_fan_speed = 100
|
||||||
min_fan_speed = 100
|
min_fan_speed = 100
|
||||||
bridge_fan_speed = 100
|
bridge_fan_speed = 100
|
||||||
disable_fan_first_layers = 1
|
disable_fan_first_layers = 1
|
||||||
temperature = 210
|
temperature = 200
|
||||||
|
|
||||||
[filament:*PET*]
|
[filament:*PET*]
|
||||||
inherits = *common*
|
inherits = *common*
|
||||||
|
@ -441,10 +463,10 @@ first_layer_bed_temperature = 90
|
||||||
inherits = *PLA*
|
inherits = *PLA*
|
||||||
renamed_from = "Prusament PLA @ENDER3"
|
renamed_from = "Prusament PLA @ENDER3"
|
||||||
filament_vendor = Prusa Polymers
|
filament_vendor = Prusa Polymers
|
||||||
temperature = 215
|
temperature = 210
|
||||||
bed_temperature = 40
|
bed_temperature = 50
|
||||||
first_layer_temperature = 215
|
first_layer_temperature = 215
|
||||||
first_layer_bed_temperature = 40
|
first_layer_bed_temperature = 50
|
||||||
filament_cost = 24.99
|
filament_cost = 24.99
|
||||||
filament_density = 1.24
|
filament_density = 1.24
|
||||||
|
|
||||||
|
@ -489,6 +511,36 @@ first_layer_bed_temperature = 60
|
||||||
filament_cost = 24.99
|
filament_cost = 24.99
|
||||||
filament_density = 1.24
|
filament_density = 1.24
|
||||||
|
|
||||||
|
[filament:Velleman PLA @CREALITY]
|
||||||
|
inherits = *PLA*
|
||||||
|
filament_vendor = Velleman
|
||||||
|
temperature = 200
|
||||||
|
bed_temperature = 60
|
||||||
|
first_layer_temperature = 205
|
||||||
|
first_layer_bed_temperature = 60
|
||||||
|
filament_cost = 27.99
|
||||||
|
filament_density = 1.24
|
||||||
|
|
||||||
|
[filament:3DJAKE ecoPLA @CREALITY]
|
||||||
|
inherits = *PLA*
|
||||||
|
filament_vendor = 3DJAKE
|
||||||
|
temperature = 200
|
||||||
|
bed_temperature = 60
|
||||||
|
first_layer_temperature = 205
|
||||||
|
first_layer_bed_temperature = 60
|
||||||
|
filament_cost = 21.99
|
||||||
|
filament_density = 1.24
|
||||||
|
|
||||||
|
[filament:123-3D Jupiter PLA @CREALITY]
|
||||||
|
inherits = *PLA*
|
||||||
|
filament_vendor = 123-3D
|
||||||
|
temperature = 200
|
||||||
|
bed_temperature = 60
|
||||||
|
first_layer_temperature = 205
|
||||||
|
first_layer_bed_temperature = 60
|
||||||
|
filament_cost = 19.50
|
||||||
|
filament_density = 1.24
|
||||||
|
|
||||||
# Common printer preset
|
# Common printer preset
|
||||||
[printer:*common*]
|
[printer:*common*]
|
||||||
printer_technology = FFF
|
printer_technology = FFF
|
||||||
|
@ -551,8 +603,8 @@ inherits = *common*
|
||||||
renamed_from = "Creality ENDER-3"
|
renamed_from = "Creality ENDER-3"
|
||||||
printer_model = ENDER3
|
printer_model = ENDER3
|
||||||
printer_variant = 0.4
|
printer_variant = 0.4
|
||||||
max_layer_height = 0.25
|
max_layer_height = 0.28
|
||||||
min_layer_height = 0.1
|
min_layer_height = 0.08
|
||||||
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_CREALITY\nPRINTER_MODEL_ENDER3\nPRINTER_HAS_BOWDEN
|
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_CREALITY\nPRINTER_MODEL_ENDER3\nPRINTER_HAS_BOWDEN
|
||||||
bed_shape = 3x3,228x3,228x228,3x228
|
bed_shape = 3x3,228x3,228x228,3x228
|
||||||
max_print_height = 250
|
max_print_height = 250
|
||||||
|
@ -578,7 +630,7 @@ retract_length = 5
|
||||||
retract_speed = 60
|
retract_speed = 60
|
||||||
deretract_speed = 40
|
deretract_speed = 40
|
||||||
retract_before_wipe = 70%
|
retract_before_wipe = 70%
|
||||||
default_print_profile = 0.15mm OPTIMAL @CREALITY
|
default_print_profile = 0.16mm OPTIMAL @CREALITY
|
||||||
default_filament_profile = Creality PLA @CREALITY
|
default_filament_profile = Creality PLA @CREALITY
|
||||||
start_gcode = G90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 ; home all\nG1 Z2 F240\nG1 X2 Y10 F3000\nG1 Z0.28 F240\nG92 E0.0\nG1 Y190 E15.0 F1500.0 ; intro line\nG1 X2.3 F5000\nG1 Y10 E15.0 F1200.0 ; intro line\nG92 E0.0
|
start_gcode = G90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 ; home all\nG1 Z2 F240\nG1 X2 Y10 F3000\nG1 Z0.28 F240\nG92 E0.0\nG1 Y190 E15.0 F1500.0 ; intro line\nG1 X2.3 F5000\nG1 Y10 E15.0 F1200.0 ; intro line\nG92 E0.0
|
||||||
end_gcode = M104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\n{if layer_z < max_print_height}G1 Z{z_offset+min(layer_z+5, max_print_height)} F600{endif} ; Move print head up\nG1 X5 Y170 F3000 ; present print\n{if layer_z < max_print_height-10}G1 Z{z_offset+min(layer_z+70, max_print_height-10)} F600{endif} ; Move print head up\nM84 X Y E ; disable motors
|
end_gcode = M104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\n{if layer_z < max_print_height}G1 Z{z_offset+min(layer_z+5, max_print_height)} F600{endif} ; Move print head up\nG1 X5 Y170 F3000 ; present print\n{if layer_z < max_print_height-10}G1 Z{z_offset+min(layer_z+70, max_print_height-10)} F600{endif} ; Move print head up\nM84 X Y E ; disable motors
|
||||||
|
|
|
@ -7,4 +7,5 @@ THIS DIRECTORY CONTAINS THE imgui-1.75 58b3e02 SOURCE DISTRIBUTION.
|
||||||
Customized with the following commits:
|
Customized with the following commits:
|
||||||
042880ba2df913916b2cc77f7bb677e07bfd2c58
|
042880ba2df913916b2cc77f7bb677e07bfd2c58
|
||||||
67c55c74901f1d337ef08f2090a87cfb4263bb0f
|
67c55c74901f1d337ef08f2090a87cfb4263bb0f
|
||||||
a94c952b40d36b1505fb77b87c0dd739e1034659
|
a94c952b40d36b1505fb77b87c0dd739e1034659
|
||||||
|
3ca3a544a87cc569b69351a77996c287763388a5
|
|
@ -121,6 +121,8 @@ namespace ImGui
|
||||||
const char MinimalizeHoverMarker = 0xF;
|
const char MinimalizeHoverMarker = 0xF;
|
||||||
const char WarningMarker = 0x10;
|
const char WarningMarker = 0x10;
|
||||||
const char ErrorMarker = 0x11;
|
const char ErrorMarker = 0x11;
|
||||||
|
const char EjectMarker = 0x12;
|
||||||
|
const char EjectHoverMarker = 0x13;
|
||||||
// void MyFunction(const char* name, const MyMatrix44& v);
|
// void MyFunction(const char* name, const MyMatrix44& v);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@ SLIC3R_DERIVE_EXCEPTION(OutOfRange, LogicError);
|
||||||
SLIC3R_DERIVE_EXCEPTION(IOError, CriticalException);
|
SLIC3R_DERIVE_EXCEPTION(IOError, CriticalException);
|
||||||
SLIC3R_DERIVE_EXCEPTION(FileIOError, IOError);
|
SLIC3R_DERIVE_EXCEPTION(FileIOError, IOError);
|
||||||
SLIC3R_DERIVE_EXCEPTION(HostNetworkError, IOError);
|
SLIC3R_DERIVE_EXCEPTION(HostNetworkError, IOError);
|
||||||
|
SLIC3R_DERIVE_EXCEPTION(ExportError, CriticalException);
|
||||||
// Runtime exception produced by Slicer. Such exception cancels the slicing process and it shall be shown in notifications.
|
// Runtime exception produced by Slicer. Such exception cancels the slicing process and it shall be shown in notifications.
|
||||||
SLIC3R_DERIVE_EXCEPTION(SlicingError, Exception);
|
SLIC3R_DERIVE_EXCEPTION(SlicingError, Exception);
|
||||||
#undef SLIC3R_DERIVE_EXCEPTION
|
#undef SLIC3R_DERIVE_EXCEPTION
|
||||||
|
|
|
@ -761,7 +761,7 @@ void GCode::do_export(Print* print, const char* path, GCodePreviewData* preview_
|
||||||
|
|
||||||
#if ENABLE_GCODE_VIEWER
|
#if ENABLE_GCODE_VIEWER
|
||||||
BOOST_LOG_TRIVIAL(debug) << "Start processing gcode, " << log_memory_info();
|
BOOST_LOG_TRIVIAL(debug) << "Start processing gcode, " << log_memory_info();
|
||||||
m_processor.process_file(path_tmp, [print]() { print->throw_if_canceled(); });
|
m_processor.process_file(path_tmp, true, [print]() { print->throw_if_canceled(); });
|
||||||
DoExport::update_print_estimated_times_stats(m_processor, print->m_print_statistics);
|
DoExport::update_print_estimated_times_stats(m_processor, print->m_print_statistics);
|
||||||
if (result != nullptr)
|
if (result != nullptr)
|
||||||
*result = std::move(m_processor.extract_result());
|
*result = std::move(m_processor.extract_result());
|
||||||
|
@ -1898,7 +1898,7 @@ namespace ProcessLayer
|
||||||
// Color Change or Tool Change as Color Change.
|
// Color Change or Tool Change as Color Change.
|
||||||
#if ENABLE_GCODE_VIEWER
|
#if ENABLE_GCODE_VIEWER
|
||||||
// add tag for processor
|
// add tag for processor
|
||||||
gcode += "; " + GCodeProcessor::Color_Change_Tag + ",T" + std::to_string(m600_extruder_before_layer) + "\n";
|
gcode += ";" + GCodeProcessor::Color_Change_Tag + ",T" + std::to_string(m600_extruder_before_layer) + "\n";
|
||||||
#else
|
#else
|
||||||
// add tag for analyzer
|
// add tag for analyzer
|
||||||
gcode += "; " + GCodeAnalyzer::Color_Change_Tag + ",T" + std::to_string(m600_extruder_before_layer) + "\n";
|
gcode += "; " + GCodeAnalyzer::Color_Change_Tag + ",T" + std::to_string(m600_extruder_before_layer) + "\n";
|
||||||
|
@ -1925,7 +1925,7 @@ namespace ProcessLayer
|
||||||
{
|
{
|
||||||
#if ENABLE_GCODE_VIEWER
|
#if ENABLE_GCODE_VIEWER
|
||||||
// add tag for processor
|
// add tag for processor
|
||||||
gcode += "; " + GCodeProcessor::Pause_Print_Tag + "\n";
|
gcode += ";" + GCodeProcessor::Pause_Print_Tag + "\n";
|
||||||
#else
|
#else
|
||||||
// add tag for analyzer
|
// add tag for analyzer
|
||||||
gcode += "; " + GCodeAnalyzer::Pause_Print_Tag + "\n";
|
gcode += "; " + GCodeAnalyzer::Pause_Print_Tag + "\n";
|
||||||
|
@ -1943,13 +1943,13 @@ namespace ProcessLayer
|
||||||
{
|
{
|
||||||
#if ENABLE_GCODE_VIEWER
|
#if ENABLE_GCODE_VIEWER
|
||||||
// add tag for processor
|
// add tag for processor
|
||||||
gcode += "; " + GCodeProcessor::Custom_Code_Tag + "\n";
|
gcode += ";" + GCodeProcessor::Custom_Code_Tag + "\n";
|
||||||
#else
|
#else
|
||||||
// add tag for analyzer
|
// add tag for analyzer
|
||||||
gcode += "; " + GCodeAnalyzer::Custom_Code_Tag + "\n";
|
gcode += "; " + GCodeAnalyzer::Custom_Code_Tag + "\n";
|
||||||
#endif // ENABLE_GCODE_VIEWER
|
|
||||||
// add tag for time estimator
|
// add tag for time estimator
|
||||||
//gcode += "; " + GCodeTimeEstimator::Custom_Code_Tag + "\n";
|
//gcode += "; " + GCodeTimeEstimator::Custom_Code_Tag + "\n";
|
||||||
|
#endif // ENABLE_GCODE_VIEWER
|
||||||
if (gcode_type == CustomGCode::Template) // Template Cistom Gcode
|
if (gcode_type == CustomGCode::Template) // Template Cistom Gcode
|
||||||
gcode += config.template_custom_gcode;
|
gcode += config.template_custom_gcode;
|
||||||
else // custom Gcode
|
else // custom Gcode
|
||||||
|
|
|
@ -750,7 +750,7 @@ void GCodeProcessor::reset()
|
||||||
#endif // ENABLE_GCODE_VIEWER_DATA_CHECKING
|
#endif // ENABLE_GCODE_VIEWER_DATA_CHECKING
|
||||||
}
|
}
|
||||||
|
|
||||||
void GCodeProcessor::process_file(const std::string& filename, std::function<void()> cancel_callback)
|
void GCodeProcessor::process_file(const std::string& filename, bool apply_postprocess, std::function<void()> cancel_callback)
|
||||||
{
|
{
|
||||||
auto last_cancel_callback_time = std::chrono::high_resolution_clock::now();
|
auto last_cancel_callback_time = std::chrono::high_resolution_clock::now();
|
||||||
|
|
||||||
|
@ -808,7 +808,8 @@ void GCodeProcessor::process_file(const std::string& filename, std::function<voi
|
||||||
update_estimated_times_stats();
|
update_estimated_times_stats();
|
||||||
|
|
||||||
// post-process to add M73 lines into the gcode
|
// post-process to add M73 lines into the gcode
|
||||||
m_time_processor.post_process(filename);
|
if (apply_postprocess)
|
||||||
|
m_time_processor.post_process(filename);
|
||||||
|
|
||||||
#if ENABLE_GCODE_VIEWER_DATA_CHECKING
|
#if ENABLE_GCODE_VIEWER_DATA_CHECKING
|
||||||
std::cout << "\n";
|
std::cout << "\n";
|
||||||
|
|
|
@ -433,7 +433,7 @@ namespace Slic3r {
|
||||||
|
|
||||||
// Process the gcode contained in the file with the given filename
|
// Process the gcode contained in the file with the given filename
|
||||||
// throws CanceledException through print->throw_if_canceled() (sent by the caller as callback).
|
// throws CanceledException through print->throw_if_canceled() (sent by the caller as callback).
|
||||||
void process_file(const std::string& filename, std::function<void()> cancel_callback = nullptr);
|
void process_file(const std::string& filename, bool apply_postprocess, std::function<void()> cancel_callback = nullptr);
|
||||||
|
|
||||||
float get_time(PrintEstimatedTimeStatistics::ETimeMode mode) const;
|
float get_time(PrintEstimatedTimeStatistics::ETimeMode mode) const;
|
||||||
std::string get_time_dhm(PrintEstimatedTimeStatistics::ETimeMode mode) const;
|
std::string get_time_dhm(PrintEstimatedTimeStatistics::ETimeMode mode) const;
|
||||||
|
|
|
@ -957,9 +957,9 @@ void PrintConfigDef::init_fff_params()
|
||||||
|
|
||||||
def = this->add("first_layer_temperature", coInts);
|
def = this->add("first_layer_temperature", coInts);
|
||||||
def->label = L("First layer");
|
def->label = L("First layer");
|
||||||
def->full_label = L("First layer extruder temperature");
|
def->full_label = L("First layer nozzle temperature");
|
||||||
def->tooltip = L("Extruder temperature for first layer. If you want to control temperature manually "
|
def->tooltip = L("Nozzle temperature for the first layer. If you want to control temperature manually "
|
||||||
"during print, set this to zero to disable temperature control commands in the output file.");
|
"during print, set this to zero to disable temperature control commands in the output G-code.");
|
||||||
def->sidetext = L("°C");
|
def->sidetext = L("°C");
|
||||||
def->min = 0;
|
def->min = 0;
|
||||||
def->max = max_temp;
|
def->max = max_temp;
|
||||||
|
@ -1170,9 +1170,9 @@ void PrintConfigDef::init_fff_params()
|
||||||
def->set_default_value(new ConfigOptionFloat(0.1));
|
def->set_default_value(new ConfigOptionFloat(0.1));
|
||||||
|
|
||||||
def = this->add("ironing_speed", coFloat);
|
def = this->add("ironing_speed", coFloat);
|
||||||
def->label = L("Ironing speed");
|
def->label = L("Ironing");
|
||||||
def->category = L("Speed");
|
def->category = L("Speed");
|
||||||
def->tooltip = L("Ironing speed");
|
def->tooltip = L("Ironing");
|
||||||
def->sidetext = L("mm/s");
|
def->sidetext = L("mm/s");
|
||||||
def->min = 0;
|
def->min = 0;
|
||||||
def->mode = comAdvanced;
|
def->mode = comAdvanced;
|
||||||
|
@ -1206,7 +1206,7 @@ void PrintConfigDef::init_fff_params()
|
||||||
def->set_default_value(new ConfigOptionBool(true));
|
def->set_default_value(new ConfigOptionBool(true));
|
||||||
|
|
||||||
def = this->add("machine_limits_usage", coEnum);
|
def = this->add("machine_limits_usage", coEnum);
|
||||||
def->label = L("How to apply");
|
def->label = L("How to apply limits");
|
||||||
def->full_label = L("Purpose of Machine Limits");
|
def->full_label = L("Purpose of Machine Limits");
|
||||||
def->category = L("Machine limits");
|
def->category = L("Machine limits");
|
||||||
def->tooltip = L("How to apply the Machine Limits");
|
def->tooltip = L("How to apply the Machine Limits");
|
||||||
|
@ -2195,10 +2195,10 @@ void PrintConfigDef::init_fff_params()
|
||||||
|
|
||||||
def = this->add("temperature", coInts);
|
def = this->add("temperature", coInts);
|
||||||
def->label = L("Other layers");
|
def->label = L("Other layers");
|
||||||
def->tooltip = L("Extruder temperature for layers after the first one. Set this to zero to disable "
|
def->tooltip = L("Nozzle temperature for layers after the first one. Set this to zero to disable "
|
||||||
"temperature control commands in the output.");
|
"temperature control commands in the output G-code.");
|
||||||
def->sidetext = L("°C");
|
def->sidetext = L("°C");
|
||||||
def->full_label = L("Extruder temperature");
|
def->full_label = L("Nozzle temperature");
|
||||||
def->min = 0;
|
def->min = 0;
|
||||||
def->max = max_temp;
|
def->max = max_temp;
|
||||||
def->set_default_value(new ConfigOptionInts { 200 });
|
def->set_default_value(new ConfigOptionInts { 200 });
|
||||||
|
@ -3686,7 +3686,7 @@ CLIMiscConfigDef::CLIMiscConfigDef()
|
||||||
def->cli = "output|o";
|
def->cli = "output|o";
|
||||||
|
|
||||||
def = this->add("single_instance", coBool);
|
def = this->add("single_instance", coBool);
|
||||||
def->label = L("Single Instance");
|
def->label = L("Single instance mode");
|
||||||
def->tooltip = L("If enabled, the command line arguments are sent to an existing instance of GUI PrusaSlicer, "
|
def->tooltip = L("If enabled, the command line arguments are sent to an existing instance of GUI PrusaSlicer, "
|
||||||
"or an existing PrusaSlicer window is activated. "
|
"or an existing PrusaSlicer window is activated. "
|
||||||
"Overrides the \"single_instance\" configuration value from application preferences.");
|
"Overrides the \"single_instance\" configuration value from application preferences.");
|
||||||
|
|
|
@ -25,12 +25,12 @@ public:
|
||||||
std::string formatted_errorstr() const
|
std::string formatted_errorstr() const
|
||||||
{
|
{
|
||||||
return L("Error with zip archive") + " " + m_zipname + ": " +
|
return L("Error with zip archive") + " " + m_zipname + ": " +
|
||||||
get_errorstr() + "!";
|
get_errorstr();
|
||||||
}
|
}
|
||||||
|
|
||||||
SLIC3R_NORETURN void blow_up() const
|
SLIC3R_NORETURN void blow_up() const
|
||||||
{
|
{
|
||||||
throw Slic3r::RuntimeError(formatted_errorstr());
|
throw Slic3r::ExportError(formatted_errorstr());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool is_alive()
|
bool is_alive()
|
||||||
|
|
|
@ -429,24 +429,20 @@ CopyFileResult copy_file_inner(const std::string& from, const std::string& to, s
|
||||||
// the copy_file() function will fail appropriately and we don't want the permission()
|
// the copy_file() function will fail appropriately and we don't want the permission()
|
||||||
// calls to cause needless failures on permissionless filesystems (ie. FATs on SD cards etc.)
|
// calls to cause needless failures on permissionless filesystems (ie. FATs on SD cards etc.)
|
||||||
// or when the target file doesn't exist.
|
// or when the target file doesn't exist.
|
||||||
|
|
||||||
//This error code is ignored
|
|
||||||
boost::system::error_code ec;
|
boost::system::error_code ec;
|
||||||
|
|
||||||
boost::filesystem::permissions(target, perms, ec);
|
boost::filesystem::permissions(target, perms, ec);
|
||||||
//if (ec)
|
if (ec)
|
||||||
// BOOST_LOG_TRIVIAL(error) << "Copy file permisions before copy error message: " << ec.message();
|
BOOST_LOG_TRIVIAL(error) << "boost::filesystem::permisions before copy error message (this could be irrelevant message based on file system): " << ec.message();
|
||||||
// This error code is passed up
|
|
||||||
ec.clear();
|
ec.clear();
|
||||||
boost::filesystem::copy_file(source, target, boost::filesystem::copy_option::overwrite_if_exists, ec);
|
boost::filesystem::copy_file(source, target, boost::filesystem::copy_option::overwrite_if_exists, ec);
|
||||||
if (ec) {
|
if (ec) {
|
||||||
error_message = ec.message();
|
error_message = ec.message();
|
||||||
return FAIL_COPY_FILE;
|
return FAIL_COPY_FILE;
|
||||||
}
|
}
|
||||||
//ec.clear();
|
ec.clear();
|
||||||
boost::filesystem::permissions(target, perms, ec);
|
boost::filesystem::permissions(target, perms, ec);
|
||||||
//if (ec)
|
if (ec)
|
||||||
// BOOST_LOG_TRIVIAL(error) << "Copy file permisions after copy error message: " << ec.message();
|
BOOST_LOG_TRIVIAL(error) << "boost::filesystem::permisions after copy error message (this could be irrelevant message based on file system): " << ec.message();
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,12 +38,12 @@ void AboutDialogLogo::onRepaint(wxEvent &event)
|
||||||
// -----------------------------------------
|
// -----------------------------------------
|
||||||
CopyrightsDialog::CopyrightsDialog()
|
CopyrightsDialog::CopyrightsDialog()
|
||||||
#if ENABLE_GCODE_VIEWER
|
#if ENABLE_GCODE_VIEWER
|
||||||
: DPIDialog(NULL, wxID_ANY, from_u8((boost::format("%1% - %2%")
|
: DPIDialog((wxWindow*)wxGetApp().mainframe, wxID_ANY, from_u8((boost::format("%1% - %2%")
|
||||||
% (wxGetApp().is_editor() ? SLIC3R_APP_NAME : GCODEVIEWER_APP_NAME)
|
% (wxGetApp().is_editor() ? SLIC3R_APP_NAME : GCODEVIEWER_APP_NAME)
|
||||||
% _utf8(L("Portions copyright"))).str()),
|
% _utf8(L("Portions copyright"))).str()),
|
||||||
wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
|
wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
|
||||||
#else
|
#else
|
||||||
: DPIDialog(NULL, wxID_ANY, from_u8((boost::format("%1% - %2%")
|
: DPIDialog((wxWindow*)wxGetApp().mainframe, wxID_ANY, from_u8((boost::format("%1% - %2%")
|
||||||
% SLIC3R_APP_NAME
|
% SLIC3R_APP_NAME
|
||||||
% _utf8(L("Portions copyright"))).str()),
|
% _utf8(L("Portions copyright"))).str()),
|
||||||
wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
|
wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
|
||||||
|
@ -209,10 +209,10 @@ void CopyrightsDialog::onCloseDialog(wxEvent &)
|
||||||
|
|
||||||
AboutDialog::AboutDialog()
|
AboutDialog::AboutDialog()
|
||||||
#if ENABLE_GCODE_VIEWER
|
#if ENABLE_GCODE_VIEWER
|
||||||
: DPIDialog(NULL, wxID_ANY, from_u8((boost::format(_utf8(L("About %s"))) % (wxGetApp().is_editor() ? SLIC3R_APP_NAME : GCODEVIEWER_APP_NAME)).str()), wxDefaultPosition,
|
: DPIDialog((wxWindow*)wxGetApp().mainframe, wxID_ANY, from_u8((boost::format(_utf8(L("About %s"))) % (wxGetApp().is_editor() ? SLIC3R_APP_NAME : GCODEVIEWER_APP_NAME)).str()), wxDefaultPosition,
|
||||||
wxDefaultSize, /*wxCAPTION*/wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
|
wxDefaultSize, /*wxCAPTION*/wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
|
||||||
#else
|
#else
|
||||||
: DPIDialog(NULL, wxID_ANY, from_u8((boost::format(_utf8(L("About %s"))) % SLIC3R_APP_NAME).str()), wxDefaultPosition,
|
: DPIDialog((wxWindow*)wxGetApp().mainframe, wxID_ANY, from_u8((boost::format(_utf8(L("About %s"))) % SLIC3R_APP_NAME).str()), wxDefaultPosition,
|
||||||
wxDefaultSize, /*wxCAPTION*/wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
|
wxDefaultSize, /*wxCAPTION*/wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
|
||||||
#endif // ENABLE_GCODE_VIEWER
|
#endif // ENABLE_GCODE_VIEWER
|
||||||
{
|
{
|
||||||
|
|
|
@ -53,6 +53,24 @@ bool SlicingProcessCompletedEvent::critical_error() const
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool SlicingProcessCompletedEvent::invalidate_plater() const
|
||||||
|
{
|
||||||
|
if (critical_error())
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
this->rethrow_exception();
|
||||||
|
}
|
||||||
|
catch (const Slic3r::ExportError&) {
|
||||||
|
// Exception thrown by copying file does not ivalidate plater
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
catch (...) {
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
std::string SlicingProcessCompletedEvent::format_error_message() const
|
std::string SlicingProcessCompletedEvent::format_error_message() const
|
||||||
{
|
{
|
||||||
std::string error;
|
std::string error;
|
||||||
|
@ -142,19 +160,19 @@ void BackgroundSlicingProcess::process_fff()
|
||||||
switch (copy_ret_val) {
|
switch (copy_ret_val) {
|
||||||
case SUCCESS: break; // no error
|
case SUCCESS: break; // no error
|
||||||
case FAIL_COPY_FILE:
|
case FAIL_COPY_FILE:
|
||||||
throw Slic3r::RuntimeError((boost::format(_utf8(L("Copying of the temporary G-code to the output G-code failed. Maybe the SD card is write locked?\nError message: %1%"))) % error_message).str());
|
throw Slic3r::ExportError((boost::format(_utf8(L("Copying of the temporary G-code to the output G-code failed. Maybe the SD card is write locked?\nError message: %1%"))) % error_message).str());
|
||||||
break;
|
break;
|
||||||
case FAIL_FILES_DIFFERENT:
|
case FAIL_FILES_DIFFERENT:
|
||||||
throw Slic3r::RuntimeError((boost::format(_utf8(L("Copying of the temporary G-code to the output G-code failed. There might be problem with target device, please try exporting again or using different device. The corrupted output G-code is at %1%.tmp."))) % export_path).str());
|
throw Slic3r::ExportError((boost::format(_utf8(L("Copying of the temporary G-code to the output G-code failed. There might be problem with target device, please try exporting again or using different device. The corrupted output G-code is at %1%.tmp."))) % export_path).str());
|
||||||
break;
|
break;
|
||||||
case FAIL_RENAMING:
|
case FAIL_RENAMING:
|
||||||
throw Slic3r::RuntimeError((boost::format(_utf8(L("Renaming of the G-code after copying to the selected destination folder has failed. Current path is %1%.tmp. Please try exporting again."))) % export_path).str());
|
throw Slic3r::ExportError((boost::format(_utf8(L("Renaming of the G-code after copying to the selected destination folder has failed. Current path is %1%.tmp. Please try exporting again."))) % export_path).str());
|
||||||
break;
|
break;
|
||||||
case FAIL_CHECK_ORIGIN_NOT_OPENED:
|
case FAIL_CHECK_ORIGIN_NOT_OPENED:
|
||||||
throw Slic3r::RuntimeError((boost::format(_utf8(L("Copying of the temporary G-code has finished but the original code at %1% couldn't be opened during copy check. The output G-code is at %2%.tmp."))) % m_temp_output_path % export_path).str());
|
throw Slic3r::ExportError((boost::format(_utf8(L("Copying of the temporary G-code has finished but the original code at %1% couldn't be opened during copy check. The output G-code is at %2%.tmp."))) % m_temp_output_path % export_path).str());
|
||||||
break;
|
break;
|
||||||
case FAIL_CHECK_TARGET_NOT_OPENED:
|
case FAIL_CHECK_TARGET_NOT_OPENED:
|
||||||
throw Slic3r::RuntimeError((boost::format(_utf8(L("Copying of the temporary G-code has finished but the exported code couldn't be opened during copy check. The output G-code is at %1%.tmp."))) % export_path).str());
|
throw Slic3r::ExportError((boost::format(_utf8(L("Copying of the temporary G-code has finished but the exported code couldn't be opened during copy check. The output G-code is at %1%.tmp."))) % export_path).str());
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw Slic3r::RuntimeError(_utf8(L("Unknown error occured during exporting G-code.")));
|
throw Slic3r::RuntimeError(_utf8(L("Unknown error occured during exporting G-code.")));
|
||||||
|
|
|
@ -57,6 +57,8 @@ public:
|
||||||
bool error() const { return m_status == Error; }
|
bool error() const { return m_status == Error; }
|
||||||
// Unhandled error produced by stdlib or a Win32 structured exception, or unhandled Slic3r's own critical exception.
|
// Unhandled error produced by stdlib or a Win32 structured exception, or unhandled Slic3r's own critical exception.
|
||||||
bool critical_error() const;
|
bool critical_error() const;
|
||||||
|
// Critical errors does invalidate plater except CopyFileError.
|
||||||
|
bool invalidate_plater() const;
|
||||||
// Only valid if error()
|
// Only valid if error()
|
||||||
void rethrow_exception() const { assert(this->error()); assert(m_exception); std::rethrow_exception(m_exception); }
|
void rethrow_exception() const { assert(this->error()); assert(m_exception); std::rethrow_exception(m_exception); }
|
||||||
// Produce a human readable message to be displayed by a notification or a message box.
|
// Produce a human readable message to be displayed by a notification or a message box.
|
||||||
|
|
|
@ -109,7 +109,7 @@ static wxString generate_html_page(const Config::SnapshotDB &snapshot_db, const
|
||||||
}
|
}
|
||||||
|
|
||||||
ConfigSnapshotDialog::ConfigSnapshotDialog(const Config::SnapshotDB &snapshot_db, const wxString &on_snapshot)
|
ConfigSnapshotDialog::ConfigSnapshotDialog(const Config::SnapshotDB &snapshot_db, const wxString &on_snapshot)
|
||||||
: DPIDialog(NULL, wxID_ANY, _(L("Configuration Snapshots")), wxDefaultPosition,
|
: DPIDialog((wxWindow*)wxGetApp().mainframe, wxID_ANY, _(L("Configuration Snapshots")), wxDefaultPosition,
|
||||||
wxSize(45 * wxGetApp().em_unit(), 40 * wxGetApp().em_unit()),
|
wxSize(45 * wxGetApp().em_unit(), 40 * wxGetApp().em_unit()),
|
||||||
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxMAXIMIZE_BOX)
|
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxMAXIMIZE_BOX)
|
||||||
{
|
{
|
||||||
|
|
|
@ -191,10 +191,12 @@ PrinterPicker::PrinterPicker(wxWindow *parent, const VendorProfile &vendor, wxSt
|
||||||
|
|
||||||
wxBitmap bitmap;
|
wxBitmap bitmap;
|
||||||
int bitmap_width = 0;
|
int bitmap_width = 0;
|
||||||
|
int bitmap_height = 0;
|
||||||
const wxString bitmap_file = GUI::from_u8(Slic3r::resources_dir() + "/profiles/" + vendor.id + "/" + model.id + "_thumbnail.png");
|
const wxString bitmap_file = GUI::from_u8(Slic3r::resources_dir() + "/profiles/" + vendor.id + "/" + model.id + "_thumbnail.png");
|
||||||
if (wxFileExists(bitmap_file)) {
|
if (wxFileExists(bitmap_file)) {
|
||||||
bitmap.LoadFile(bitmap_file, wxBITMAP_TYPE_PNG);
|
bitmap.LoadFile(bitmap_file, wxBITMAP_TYPE_PNG);
|
||||||
bitmap_width = bitmap.GetWidth();
|
bitmap_width = bitmap.GetWidth();
|
||||||
|
bitmap_height = bitmap.GetHeight();
|
||||||
} else {
|
} else {
|
||||||
BOOST_LOG_TRIVIAL(warning) << boost::format("Can't find bitmap file `%1%` for vendor `%2%`, printer `%3%`, using placeholder icon instead")
|
BOOST_LOG_TRIVIAL(warning) << boost::format("Can't find bitmap file `%1%` for vendor `%2%`, printer `%3%`, using placeholder icon instead")
|
||||||
% bitmap_file
|
% bitmap_file
|
||||||
|
@ -205,6 +207,7 @@ PrinterPicker::PrinterPicker(wxWindow *parent, const VendorProfile &vendor, wxSt
|
||||||
if (wxFileExists(placeholder_file)) {
|
if (wxFileExists(placeholder_file)) {
|
||||||
bitmap.LoadFile(placeholder_file, wxBITMAP_TYPE_PNG);
|
bitmap.LoadFile(placeholder_file, wxBITMAP_TYPE_PNG);
|
||||||
bitmap_width = bitmap.GetWidth();
|
bitmap_width = bitmap.GetWidth();
|
||||||
|
bitmap_height = bitmap.GetHeight();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -274,15 +277,12 @@ PrinterPicker::PrinterPicker(wxWindow *parent, const VendorProfile &vendor, wxSt
|
||||||
for (size_t j = i; j < i + cols; j++) { printer_grid->Add(bitmaps[j], 0, wxBOTTOM, 20); }
|
for (size_t j = i; j < i + cols; j++) { printer_grid->Add(bitmaps[j], 0, wxBOTTOM, 20); }
|
||||||
for (size_t j = i; j < i + cols; j++) { printer_grid->Add(variants_panels[j]); }
|
for (size_t j = i; j < i + cols; j++) { printer_grid->Add(variants_panels[j]); }
|
||||||
|
|
||||||
// Add separator space
|
// Add separator space to multiliners
|
||||||
if (i > 0) {
|
if (titles.size() > cols) {
|
||||||
for (size_t j = i; j < i + cols; j++) { printer_grid->Add(1, 100); }
|
for (size_t j = i; j < i + cols; j++) { printer_grid->Add(1, 30); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (odd_items > 0) {
|
if (odd_items > 0) {
|
||||||
for (size_t i = 0; i < cols; i++) { printer_grid->Add(1, 100); }
|
|
||||||
|
|
||||||
const size_t rem = titles.size() - odd_items;
|
const size_t rem = titles.size() - odd_items;
|
||||||
|
|
||||||
for (size_t i = rem; i < titles.size(); i++) { printer_grid->Add(titles[i], 0, wxBOTTOM, 3); }
|
for (size_t i = rem; i < titles.size(); i++) { printer_grid->Add(titles[i], 0, wxBOTTOM, 3); }
|
||||||
|
@ -1389,7 +1389,7 @@ void PageDiameters::apply_custom_config(DynamicPrintConfig &config)
|
||||||
}
|
}
|
||||||
|
|
||||||
PageTemperatures::PageTemperatures(ConfigWizard *parent)
|
PageTemperatures::PageTemperatures(ConfigWizard *parent)
|
||||||
: ConfigWizardPage(parent, _(L("Extruder and Bed Temperatures")), _(L("Temperatures")), 1)
|
: ConfigWizardPage(parent, _(L("Nozzle and Bed Temperatures")), _(L("Temperatures")), 1)
|
||||||
, spin_extr(new wxSpinCtrlDouble(this, wxID_ANY))
|
, spin_extr(new wxSpinCtrlDouble(this, wxID_ANY))
|
||||||
, spin_bed(new wxSpinCtrlDouble(this, wxID_ANY))
|
, spin_bed(new wxSpinCtrlDouble(this, wxID_ANY))
|
||||||
{
|
{
|
||||||
|
|
|
@ -53,11 +53,6 @@ static std::string gcode(Type type)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool is_lower_thumb_editable()
|
|
||||||
{
|
|
||||||
return Slic3r::GUI::get_app_config()->get("seq_top_layer_only") == "0";
|
|
||||||
}
|
|
||||||
|
|
||||||
Control::Control( wxWindow *parent,
|
Control::Control( wxWindow *parent,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
int lowerValue,
|
int lowerValue,
|
||||||
|
@ -299,6 +294,8 @@ wxSize Control::get_size() const
|
||||||
void Control::get_size(int* w, int* h) const
|
void Control::get_size(int* w, int* h) const
|
||||||
{
|
{
|
||||||
GetSize(w, h);
|
GetSize(w, h);
|
||||||
|
if (m_draw_mode == dmSequentialGCodeView)
|
||||||
|
return; // we have no more icons for drawing
|
||||||
is_horizontal() ? *w -= m_lock_icon_dim : *h -= m_lock_icon_dim;
|
is_horizontal() ? *w -= m_lock_icon_dim : *h -= m_lock_icon_dim;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -914,6 +911,10 @@ void Control::draw_revert_icon(wxDC& dc)
|
||||||
|
|
||||||
void Control::draw_cog_icon(wxDC& dc)
|
void Control::draw_cog_icon(wxDC& dc)
|
||||||
{
|
{
|
||||||
|
#if ENABLE_GCODE_VIEWER
|
||||||
|
if (m_draw_mode == dmSequentialGCodeView)
|
||||||
|
return;
|
||||||
|
#endif // ENABLE_GCODE_VIEWER
|
||||||
int width, height;
|
int width, height;
|
||||||
get_size(&width, &height);
|
get_size(&width, &height);
|
||||||
|
|
||||||
|
@ -960,6 +961,13 @@ int Control::get_value_from_position(const wxCoord x, const wxCoord y)
|
||||||
return int(m_min_value + double(height - SLIDER_MARGIN - y) / step + 0.5);
|
return int(m_min_value + double(height - SLIDER_MARGIN - y) / step + 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Control::is_lower_thumb_editable()
|
||||||
|
{
|
||||||
|
if (m_draw_mode == dmSequentialGCodeView)
|
||||||
|
return Slic3r::GUI::get_app_config()->get("seq_top_layer_only") == "0";
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool Control::detect_selected_slider(const wxPoint& pt)
|
bool Control::detect_selected_slider(const wxPoint& pt)
|
||||||
{
|
{
|
||||||
if (is_point_in_rect(pt, m_rect_lower_thumb))
|
if (is_point_in_rect(pt, m_rect_lower_thumb))
|
||||||
|
|
|
@ -293,6 +293,7 @@ protected:
|
||||||
void draw_thumb_text(wxDC& dc, const wxPoint& pos, const SelectedSlider& selection) const;
|
void draw_thumb_text(wxDC& dc, const wxPoint& pos, const SelectedSlider& selection) const;
|
||||||
|
|
||||||
void update_thumb_rect(const wxCoord begin_x, const wxCoord begin_y, const SelectedSlider& selection);
|
void update_thumb_rect(const wxCoord begin_x, const wxCoord begin_y, const SelectedSlider& selection);
|
||||||
|
bool is_lower_thumb_editable();
|
||||||
bool detect_selected_slider(const wxPoint& pt);
|
bool detect_selected_slider(const wxPoint& pt);
|
||||||
void correct_lower_value();
|
void correct_lower_value();
|
||||||
void correct_higher_value();
|
void correct_higher_value();
|
||||||
|
|
|
@ -20,7 +20,7 @@ namespace Slic3r {
|
||||||
namespace GUI {
|
namespace GUI {
|
||||||
|
|
||||||
ExtruderSequenceDialog::ExtruderSequenceDialog(const DoubleSlider::ExtrudersSequence& sequence)
|
ExtruderSequenceDialog::ExtruderSequenceDialog(const DoubleSlider::ExtrudersSequence& sequence)
|
||||||
: DPIDialog(NULL, wxID_ANY, wxString(SLIC3R_APP_NAME) + " - " + _(L("Set extruder sequence")),
|
: DPIDialog((wxWindow*)wxGetApp().mainframe, wxID_ANY, wxString(SLIC3R_APP_NAME) + " - " + _(L("Set extruder sequence")),
|
||||||
wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER),
|
wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER),
|
||||||
m_sequence(sequence)
|
m_sequence(sequence)
|
||||||
{
|
{
|
||||||
|
|
|
@ -112,16 +112,14 @@ bool GCodeViewer::Path::matches(const GCodeProcessor::MoveVertex& move) const
|
||||||
case EMoveType::Custom_GCode:
|
case EMoveType::Custom_GCode:
|
||||||
case EMoveType::Retract:
|
case EMoveType::Retract:
|
||||||
case EMoveType::Unretract:
|
case EMoveType::Unretract:
|
||||||
case EMoveType::Extrude:
|
case EMoveType::Extrude: {
|
||||||
{
|
|
||||||
// use rounding to reduce the number of generated paths
|
// use rounding to reduce the number of generated paths
|
||||||
return type == move.type && role == move.extrusion_role && height == round_to_nearest(move.height, 2) &&
|
return type == move.type && move.position[2] <= first.position[2] && role == move.extrusion_role && height == round_to_nearest(move.height, 2) &&
|
||||||
width == round_to_nearest(move.width, 2) && feedrate == move.feedrate && fan_speed == move.fan_speed &&
|
width == round_to_nearest(move.width, 2) && feedrate == move.feedrate && fan_speed == move.fan_speed &&
|
||||||
volumetric_rate == round_to_nearest(move.volumetric_rate(), 2) && extruder_id == move.extruder_id &&
|
volumetric_rate == round_to_nearest(move.volumetric_rate(), 2) && extruder_id == move.extruder_id &&
|
||||||
cp_color_id == move.cp_color_id;
|
cp_color_id == move.cp_color_id;
|
||||||
}
|
}
|
||||||
case EMoveType::Travel:
|
case EMoveType::Travel: {
|
||||||
{
|
|
||||||
return type == move.type && feedrate == move.feedrate && extruder_id == move.extruder_id && cp_color_id == move.cp_color_id;
|
return type == move.type && feedrate == move.feedrate && extruder_id == move.extruder_id && cp_color_id == move.cp_color_id;
|
||||||
}
|
}
|
||||||
default: { return false; }
|
default: { return false; }
|
||||||
|
@ -1531,14 +1529,15 @@ void GCodeViewer::load_toolpaths(const GCodeProcessor::Result& gcode_result)
|
||||||
// dismiss indices data, no more needed
|
// dismiss indices data, no more needed
|
||||||
std::vector<MultiIndexBuffer>().swap(indices);
|
std::vector<MultiIndexBuffer>().swap(indices);
|
||||||
|
|
||||||
// layers zs / roles / extruder ids / cp color ids -> extract from result
|
// layers zs -> extract from result
|
||||||
|
for (const Path& path : m_buffers[buffer_id(EMoveType::Extrude)].paths) {
|
||||||
|
m_layers_zs.emplace_back(static_cast<double>(path.first.position[2]));
|
||||||
|
// m_layers_zs.emplace_back(static_cast<double>(path.last.position[2]));
|
||||||
|
}
|
||||||
|
// roles / extruder ids / cp color ids -> extract from result
|
||||||
for (size_t i = 0; i < m_moves_count; ++i) {
|
for (size_t i = 0; i < m_moves_count; ++i) {
|
||||||
const GCodeProcessor::MoveVertex& move = gcode_result.moves[i];
|
const GCodeProcessor::MoveVertex& move = gcode_result.moves[i];
|
||||||
if (move.type == EMoveType::Extrude)
|
|
||||||
m_layers_zs.emplace_back(static_cast<double>(move.position[2]));
|
|
||||||
|
|
||||||
m_extruder_ids.emplace_back(move.extruder_id);
|
m_extruder_ids.emplace_back(move.extruder_id);
|
||||||
|
|
||||||
if (i > 0)
|
if (i > 0)
|
||||||
m_roles.emplace_back(move.extrusion_role);
|
m_roles.emplace_back(move.extrusion_role);
|
||||||
}
|
}
|
||||||
|
@ -2415,28 +2414,26 @@ void GCodeViewer::render_legend() const
|
||||||
for (const auto& time_rec : times) {
|
for (const auto& time_rec : times) {
|
||||||
switch (time_rec.first)
|
switch (time_rec.first)
|
||||||
{
|
{
|
||||||
case CustomGCode::PausePrint:
|
case CustomGCode::PausePrint: {
|
||||||
{
|
|
||||||
auto it = std::find_if(custom_gcode_per_print_z.begin(), custom_gcode_per_print_z.end(), [time_rec](const CustomGCode::Item& item) { return item.type == time_rec.first; });
|
auto it = std::find_if(custom_gcode_per_print_z.begin(), custom_gcode_per_print_z.end(), [time_rec](const CustomGCode::Item& item) { return item.type == time_rec.first; });
|
||||||
if (it != custom_gcode_per_print_z.end()) {
|
if (it != custom_gcode_per_print_z.end()) {
|
||||||
items.push_back({ PartialTime::EType::Print, it->extruder, Color(), Color(), time_rec.second });
|
items.push_back({ PartialTime::EType::Print, it->extruder, last_color[it->extruder - 1], Color(), time_rec.second });
|
||||||
items.push_back({ PartialTime::EType::Pause, it->extruder, Color(), Color(), time_rec.second });
|
items.push_back({ PartialTime::EType::Pause, it->extruder, Color(), Color(), time_rec.second });
|
||||||
custom_gcode_per_print_z.erase(it);
|
custom_gcode_per_print_z.erase(it);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case CustomGCode::ColorChange:
|
case CustomGCode::ColorChange: {
|
||||||
{
|
|
||||||
auto it = std::find_if(custom_gcode_per_print_z.begin(), custom_gcode_per_print_z.end(), [time_rec](const CustomGCode::Item& item) { return item.type == time_rec.first; });
|
auto it = std::find_if(custom_gcode_per_print_z.begin(), custom_gcode_per_print_z.end(), [time_rec](const CustomGCode::Item& item) { return item.type == time_rec.first; });
|
||||||
if (it != custom_gcode_per_print_z.end()) {
|
if (it != custom_gcode_per_print_z.end()) {
|
||||||
items.push_back({ PartialTime::EType::Print, it->extruder, Color(), Color(), time_rec.second });
|
items.push_back({ PartialTime::EType::Print, it->extruder, last_color[it->extruder - 1], Color(), time_rec.second });
|
||||||
items.push_back({ PartialTime::EType::ColorChange, it->extruder, last_color[it->extruder - 1], decode_color(it->color), time_rec.second });
|
items.push_back({ PartialTime::EType::ColorChange, it->extruder, last_color[it->extruder - 1], decode_color(it->color), time_rec.second });
|
||||||
last_color[it->extruder - 1] = decode_color(it->color);
|
last_color[it->extruder - 1] = decode_color(it->color);
|
||||||
last_extruder_id = it->extruder;
|
last_extruder_id = it->extruder;
|
||||||
custom_gcode_per_print_z.erase(it);
|
custom_gcode_per_print_z.erase(it);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
items.push_back({ PartialTime::EType::Print, last_extruder_id, Color(), Color(), time_rec.second });
|
items.push_back({ PartialTime::EType::Print, last_extruder_id, last_color[last_extruder_id - 1], Color(), time_rec.second });
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2447,7 +2444,7 @@ void GCodeViewer::render_legend() const
|
||||||
return items;
|
return items;
|
||||||
};
|
};
|
||||||
|
|
||||||
auto append_color = [this, &imgui](const Color& color1, const Color& color2, std::array<float, 2>& offsets, const Times& times) {
|
auto append_color_change = [this, &imgui](const Color& color1, const Color& color2, const std::array<float, 2>& offsets, const Times& times) {
|
||||||
imgui.text(_u8L("Color change"));
|
imgui.text(_u8L("Color change"));
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
|
||||||
|
@ -2466,6 +2463,24 @@ void GCodeViewer::render_legend() const
|
||||||
imgui.text(short_time(get_time_dhms(times.second - times.first)));
|
imgui.text(short_time(get_time_dhms(times.second - times.first)));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
auto append_print = [this, &imgui](const Color& color, const std::array<float, 2>& offsets, const Times& times) {
|
||||||
|
imgui.text(_u8L("Print"));
|
||||||
|
ImGui::SameLine();
|
||||||
|
|
||||||
|
float icon_size = ImGui::GetTextLineHeight();
|
||||||
|
ImDrawList* draw_list = ImGui::GetWindowDrawList();
|
||||||
|
ImVec2 pos = ImGui::GetCursorScreenPos();
|
||||||
|
pos.x -= 0.5f * ImGui::GetStyle().ItemSpacing.x;
|
||||||
|
|
||||||
|
draw_list->AddRectFilled({ pos.x + 1.0f, pos.y + 1.0f }, { pos.x + icon_size - 1.0f, pos.y + icon_size - 1.0f },
|
||||||
|
ImGui::GetColorU32({ color[0], color[1], color[2], 1.0f }));
|
||||||
|
|
||||||
|
ImGui::SameLine(offsets[0]);
|
||||||
|
imgui.text(short_time(get_time_dhms(times.second)));
|
||||||
|
ImGui::SameLine(offsets[1]);
|
||||||
|
imgui.text(short_time(get_time_dhms(times.first)));
|
||||||
|
};
|
||||||
|
|
||||||
PartialTimes partial_times = generate_partial_times(time_mode.custom_gcode_times);
|
PartialTimes partial_times = generate_partial_times(time_mode.custom_gcode_times);
|
||||||
if (!partial_times.empty()) {
|
if (!partial_times.empty()) {
|
||||||
labels.clear();
|
labels.clear();
|
||||||
|
@ -2474,8 +2489,8 @@ void GCodeViewer::render_legend() const
|
||||||
for (const PartialTime& item : partial_times) {
|
for (const PartialTime& item : partial_times) {
|
||||||
switch (item.type)
|
switch (item.type)
|
||||||
{
|
{
|
||||||
case PartialTime::EType::Print: { labels.push_back(_u8L("Print")); break; }
|
case PartialTime::EType::Print: { labels.push_back(_u8L("Print")); break; }
|
||||||
case PartialTime::EType::Pause: { labels.push_back(_u8L("Pause")); break; }
|
case PartialTime::EType::Pause: { labels.push_back(_u8L("Pause")); break; }
|
||||||
case PartialTime::EType::ColorChange: { labels.push_back(_u8L("Color change")); break; }
|
case PartialTime::EType::ColorChange: { labels.push_back(_u8L("Color change")); break; }
|
||||||
}
|
}
|
||||||
times.push_back(short_time(get_time_dhms(item.times.second)));
|
times.push_back(short_time(get_time_dhms(item.times.second)));
|
||||||
|
@ -2487,25 +2502,18 @@ void GCodeViewer::render_legend() const
|
||||||
for (const PartialTime& item : partial_times) {
|
for (const PartialTime& item : partial_times) {
|
||||||
switch (item.type)
|
switch (item.type)
|
||||||
{
|
{
|
||||||
case PartialTime::EType::Print:
|
case PartialTime::EType::Print: {
|
||||||
{
|
append_print(item.color1, offsets, item.times);
|
||||||
imgui.text(_u8L("Print"));
|
|
||||||
ImGui::SameLine(offsets[0]);
|
|
||||||
imgui.text(short_time(get_time_dhms(item.times.second)));
|
|
||||||
ImGui::SameLine(offsets[1]);
|
|
||||||
imgui.text(short_time(get_time_dhms(item.times.first)));
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case PartialTime::EType::Pause:
|
case PartialTime::EType::Pause: {
|
||||||
{
|
|
||||||
imgui.text(_u8L("Pause"));
|
imgui.text(_u8L("Pause"));
|
||||||
ImGui::SameLine(offsets[0]);
|
ImGui::SameLine(offsets[0]);
|
||||||
imgui.text(short_time(get_time_dhms(item.times.second - item.times.first)));
|
imgui.text(short_time(get_time_dhms(item.times.second - item.times.first)));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case PartialTime::EType::ColorChange:
|
case PartialTime::EType::ColorChange: {
|
||||||
{
|
append_color_change(item.color1, item.color2, offsets, item.times);
|
||||||
append_color(item.color1, item.color2, offsets, item.times);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2519,12 +2527,10 @@ void GCodeViewer::render_legend() const
|
||||||
{
|
{
|
||||||
case EViewType::Feedrate:
|
case EViewType::Feedrate:
|
||||||
case EViewType::Tool:
|
case EViewType::Tool:
|
||||||
case EViewType::ColorPrint:
|
case EViewType::ColorPrint: {
|
||||||
{
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default: {
|
||||||
{
|
|
||||||
// title
|
// title
|
||||||
ImGui::Spacing();
|
ImGui::Spacing();
|
||||||
imgui.title(_u8L("Travel"));
|
imgui.title(_u8L("Travel"));
|
||||||
|
@ -2570,8 +2576,8 @@ void GCodeViewer::render_legend() const
|
||||||
add_option(EMoveType::Unretract, EOptionsColors::Unretractions, _u8L("Deretractions"));
|
add_option(EMoveType::Unretract, EOptionsColors::Unretractions, _u8L("Deretractions"));
|
||||||
add_option(EMoveType::Tool_change, EOptionsColors::ToolChanges, _u8L("Tool changes"));
|
add_option(EMoveType::Tool_change, EOptionsColors::ToolChanges, _u8L("Tool changes"));
|
||||||
add_option(EMoveType::Color_change, EOptionsColors::ColorChanges, _u8L("Color changes"));
|
add_option(EMoveType::Color_change, EOptionsColors::ColorChanges, _u8L("Color changes"));
|
||||||
add_option(EMoveType::Pause_Print, EOptionsColors::PausePrints, _u8L("Pause prints"));
|
add_option(EMoveType::Pause_Print, EOptionsColors::PausePrints, _u8L("Print pauses"));
|
||||||
add_option(EMoveType::Custom_GCode, EOptionsColors::CustomGCodes, _u8L("Custom GCodes"));
|
add_option(EMoveType::Custom_GCode, EOptionsColors::CustomGCodes, _u8L("Custom G-codes"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// total estimated printing time section
|
// total estimated printing time section
|
||||||
|
|
|
@ -1415,7 +1415,7 @@ void GLCanvas3D::Tooltip::render(const Vec2d& mouse_position, GLCanvas3D& canvas
|
||||||
ImGui::PushStyleVar(ImGuiStyleVar_Alpha, alpha);
|
ImGui::PushStyleVar(ImGuiStyleVar_Alpha, alpha);
|
||||||
imgui.set_next_window_pos(position(0), position(1), ImGuiCond_Always, 0.0f, 0.0f);
|
imgui.set_next_window_pos(position(0), position(1), ImGuiCond_Always, 0.0f, 0.0f);
|
||||||
|
|
||||||
imgui.begin(_L("canvas_tooltip"), ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoFocusOnAppearing);
|
imgui.begin(wxString("canvas_tooltip"), ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoFocusOnAppearing);
|
||||||
ImGui::BringWindowToDisplayFront(ImGui::GetCurrentWindow());
|
ImGui::BringWindowToDisplayFront(ImGui::GetCurrentWindow());
|
||||||
ImGui::TextUnformatted(m_text.c_str());
|
ImGui::TextUnformatted(m_text.c_str());
|
||||||
|
|
||||||
|
@ -1457,6 +1457,7 @@ wxDEFINE_EVENT(EVT_GLCANVAS_MOVE_LAYERS_SLIDER, wxKeyEvent);
|
||||||
wxDEFINE_EVENT(EVT_GLCANVAS_MOVE_DOUBLE_SLIDER, wxKeyEvent);
|
wxDEFINE_EVENT(EVT_GLCANVAS_MOVE_DOUBLE_SLIDER, wxKeyEvent);
|
||||||
#endif // ENABLE_GCODE_VIEWER
|
#endif // ENABLE_GCODE_VIEWER
|
||||||
wxDEFINE_EVENT(EVT_GLCANVAS_EDIT_COLOR_CHANGE, wxKeyEvent);
|
wxDEFINE_EVENT(EVT_GLCANVAS_EDIT_COLOR_CHANGE, wxKeyEvent);
|
||||||
|
wxDEFINE_EVENT(EVT_GLCANVAS_JUMP_TO, wxKeyEvent);
|
||||||
wxDEFINE_EVENT(EVT_GLCANVAS_UNDO, SimpleEvent);
|
wxDEFINE_EVENT(EVT_GLCANVAS_UNDO, SimpleEvent);
|
||||||
wxDEFINE_EVENT(EVT_GLCANVAS_REDO, SimpleEvent);
|
wxDEFINE_EVENT(EVT_GLCANVAS_REDO, SimpleEvent);
|
||||||
wxDEFINE_EVENT(EVT_GLCANVAS_COLLAPSE_SIDEBAR, SimpleEvent);
|
wxDEFINE_EVENT(EVT_GLCANVAS_COLLAPSE_SIDEBAR, SimpleEvent);
|
||||||
|
@ -2899,6 +2900,7 @@ void GLCanvas3D::on_char(wxKeyEvent& evt)
|
||||||
// see include/wx/defs.h enum wxKeyCode
|
// see include/wx/defs.h enum wxKeyCode
|
||||||
int keyCode = evt.GetKeyCode();
|
int keyCode = evt.GetKeyCode();
|
||||||
int ctrlMask = wxMOD_CONTROL;
|
int ctrlMask = wxMOD_CONTROL;
|
||||||
|
int shiftMask = wxMOD_SHIFT;
|
||||||
|
|
||||||
auto imgui = wxGetApp().imgui();
|
auto imgui = wxGetApp().imgui();
|
||||||
if (imgui->update_key_data(evt)) {
|
if (imgui->update_key_data(evt)) {
|
||||||
|
@ -2996,6 +2998,18 @@ void GLCanvas3D::on_char(wxKeyEvent& evt)
|
||||||
post_event(SimpleEvent(EVT_GLTOOLBAR_DELETE_ALL)); break;
|
post_event(SimpleEvent(EVT_GLTOOLBAR_DELETE_ALL)); break;
|
||||||
default: evt.Skip();
|
default: evt.Skip();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else if ((evt.GetModifiers() & shiftMask) != 0) {
|
||||||
|
switch (keyCode) {
|
||||||
|
case 'g':
|
||||||
|
case 'G': {
|
||||||
|
if (dynamic_cast<Preview*>(m_canvas->GetParent()) != nullptr)
|
||||||
|
post_event(wxKeyEvent(EVT_GLCANVAS_JUMP_TO, evt));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
evt.Skip();
|
||||||
|
}
|
||||||
} else if (evt.HasModifiers()) {
|
} else if (evt.HasModifiers()) {
|
||||||
evt.Skip();
|
evt.Skip();
|
||||||
} else {
|
} else {
|
||||||
|
@ -4385,7 +4399,7 @@ bool GLCanvas3D::_render_search_list(float pos_x) const
|
||||||
|
|
||||||
std::string& search_line = sidebar.get_search_line();
|
std::string& search_line = sidebar.get_search_line();
|
||||||
char *s = new char[255];
|
char *s = new char[255];
|
||||||
strcpy(s, search_line.empty() ? _u8L("Type here to search").c_str() : search_line.c_str());
|
strcpy(s, search_line.empty() ? _u8L("Enter a search term").c_str() : search_line.c_str());
|
||||||
|
|
||||||
imgui->search_list(ImVec2(45 * em, 30 * em), &search_string_getter, s,
|
imgui->search_list(ImVec2(45 * em, 30 * em), &search_string_getter, s,
|
||||||
sidebar.get_searcher().view_params,
|
sidebar.get_searcher().view_params,
|
||||||
|
@ -4393,7 +4407,7 @@ bool GLCanvas3D::_render_search_list(float pos_x) const
|
||||||
|
|
||||||
search_line = s;
|
search_line = s;
|
||||||
delete [] s;
|
delete [] s;
|
||||||
if (search_line == _u8L("Type here to search"))
|
if (search_line == _u8L("Enter a search term"))
|
||||||
search_line.clear();
|
search_line.clear();
|
||||||
|
|
||||||
if (edited)
|
if (edited)
|
||||||
|
|
|
@ -114,6 +114,7 @@ wxDECLARE_EVENT(EVT_GLCANVAS_MOVE_LAYERS_SLIDER, wxKeyEvent);
|
||||||
wxDECLARE_EVENT(EVT_GLCANVAS_MOVE_DOUBLE_SLIDER, wxKeyEvent);
|
wxDECLARE_EVENT(EVT_GLCANVAS_MOVE_DOUBLE_SLIDER, wxKeyEvent);
|
||||||
#endif // ENABLE_GCODE_VIEWER
|
#endif // ENABLE_GCODE_VIEWER
|
||||||
wxDECLARE_EVENT(EVT_GLCANVAS_EDIT_COLOR_CHANGE, wxKeyEvent);
|
wxDECLARE_EVENT(EVT_GLCANVAS_EDIT_COLOR_CHANGE, wxKeyEvent);
|
||||||
|
wxDECLARE_EVENT(EVT_GLCANVAS_JUMP_TO, wxKeyEvent);
|
||||||
wxDECLARE_EVENT(EVT_GLCANVAS_UNDO, SimpleEvent);
|
wxDECLARE_EVENT(EVT_GLCANVAS_UNDO, SimpleEvent);
|
||||||
wxDECLARE_EVENT(EVT_GLCANVAS_REDO, SimpleEvent);
|
wxDECLARE_EVENT(EVT_GLCANVAS_REDO, SimpleEvent);
|
||||||
wxDECLARE_EVENT(EVT_GLCANVAS_COLLAPSE_SIDEBAR, SimpleEvent);
|
wxDECLARE_EVENT(EVT_GLCANVAS_COLLAPSE_SIDEBAR, SimpleEvent);
|
||||||
|
|
|
@ -86,7 +86,7 @@ class SplashScreen : public wxSplashScreen
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SplashScreen(const wxBitmap& bitmap, long splashStyle, int milliseconds, wxPoint pos = wxDefaultPosition)
|
SplashScreen(const wxBitmap& bitmap, long splashStyle, int milliseconds, wxPoint pos = wxDefaultPosition)
|
||||||
: wxSplashScreen(bitmap, splashStyle, milliseconds, nullptr, wxID_ANY, wxDefaultPosition, wxDefaultSize,
|
: wxSplashScreen(bitmap, splashStyle, milliseconds, (wxWindow*)wxGetApp().mainframe, wxID_ANY, wxDefaultPosition, wxDefaultSize,
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
wxSIMPLE_BORDER | wxFRAME_NO_TASKBAR | wxSTAY_ON_TOP
|
wxSIMPLE_BORDER | wxFRAME_NO_TASKBAR | wxSTAY_ON_TOP
|
||||||
#else
|
#else
|
||||||
|
@ -892,7 +892,7 @@ bool GUI_App::on_init_inner()
|
||||||
#else
|
#else
|
||||||
if (scrn)
|
if (scrn)
|
||||||
#endif // ENABLE_GCODE_VIEWER
|
#endif // ENABLE_GCODE_VIEWER
|
||||||
scrn->SetText(_L("Creating settings tabs..."));
|
scrn->SetText(_L("Preparing settings tabs..."));
|
||||||
|
|
||||||
mainframe = new MainFrame();
|
mainframe = new MainFrame();
|
||||||
// hide settings tabs after first Layout
|
// hide settings tabs after first Layout
|
||||||
|
@ -1149,8 +1149,8 @@ void GUI_App::check_printer_presets()
|
||||||
for (const std::string& preset_name : preset_names)
|
for (const std::string& preset_name : preset_names)
|
||||||
msg_text += "\n \"" + from_u8(preset_name) + "\",";
|
msg_text += "\n \"" + from_u8(preset_name) + "\",";
|
||||||
msg_text.RemoveLast();
|
msg_text.RemoveLast();
|
||||||
msg_text += "\n\n" + _L("But from this version of PrusaSlicer we don't show/use this information in Printer Settings.\n"
|
msg_text += "\n\n" + _L("But since this version of PrusaSlicer we don't show this information in Printer Settings anymore.\n"
|
||||||
"Now, this information will be exposed in physical printers settings.") + "\n\n" +
|
"Settings will be available in physical printers settings.") + "\n\n" +
|
||||||
_L("By default new Printer devices will be named as \"Printer N\" during its creation.\n"
|
_L("By default new Printer devices will be named as \"Printer N\" during its creation.\n"
|
||||||
"Note: This name can be changed later from the physical printers settings");
|
"Note: This name can be changed later from the physical printers settings");
|
||||||
|
|
||||||
|
|
|
@ -557,6 +557,16 @@ void Preview::msw_rescale()
|
||||||
refresh_print();
|
refresh_print();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Preview::jump_layers_slider(wxKeyEvent& evt)
|
||||||
|
{
|
||||||
|
#if ENABLE_GCODE_VIEWER
|
||||||
|
if (m_layers_slider) m_layers_slider->OnChar(evt);
|
||||||
|
#else
|
||||||
|
if (m_slider)
|
||||||
|
m_slider->OnKeyDown(evt);
|
||||||
|
#endif // ENABLE_GCODE_VIEWER
|
||||||
|
}
|
||||||
|
|
||||||
#if ENABLE_GCODE_VIEWER
|
#if ENABLE_GCODE_VIEWER
|
||||||
void Preview::move_layers_slider(wxKeyEvent& evt)
|
void Preview::move_layers_slider(wxKeyEvent& evt)
|
||||||
{
|
{
|
||||||
|
@ -1463,8 +1473,8 @@ wxString Preview::get_option_type_string(OptionType type) const
|
||||||
case OptionType::Unretractions: { return _L("Deretractions"); }
|
case OptionType::Unretractions: { return _L("Deretractions"); }
|
||||||
case OptionType::ToolChanges: { return _L("Tool changes"); }
|
case OptionType::ToolChanges: { return _L("Tool changes"); }
|
||||||
case OptionType::ColorChanges: { return _L("Color changes"); }
|
case OptionType::ColorChanges: { return _L("Color changes"); }
|
||||||
case OptionType::PausePrints: { return _L("Pause prints"); }
|
case OptionType::PausePrints: { return _L("Print pauses"); }
|
||||||
case OptionType::CustomGCodes: { return _L("Custom GCodes"); }
|
case OptionType::CustomGCodes: { return _L("Custom G-codes"); }
|
||||||
case OptionType::Shells: { return _L("Shells"); }
|
case OptionType::Shells: { return _L("Shells"); }
|
||||||
case OptionType::ToolMarker: { return _L("Tool marker"); }
|
case OptionType::ToolMarker: { return _L("Tool marker"); }
|
||||||
case OptionType::Legend: { return _L("Legend/Estimated printing time"); }
|
case OptionType::Legend: { return _L("Legend/Estimated printing time"); }
|
||||||
|
|
|
@ -179,6 +179,7 @@ Preview(wxWindow* parent, Model* model, DynamicPrintConfig* config,
|
||||||
void refresh_print();
|
void refresh_print();
|
||||||
|
|
||||||
void msw_rescale();
|
void msw_rescale();
|
||||||
|
void jump_layers_slider(wxKeyEvent& evt);
|
||||||
#if ENABLE_GCODE_VIEWER
|
#if ENABLE_GCODE_VIEWER
|
||||||
void move_layers_slider(wxKeyEvent& evt);
|
void move_layers_slider(wxKeyEvent& evt);
|
||||||
void edit_layers_slider(wxKeyEvent& evt);
|
void edit_layers_slider(wxKeyEvent& evt);
|
||||||
|
|
|
@ -95,6 +95,7 @@ public:
|
||||||
#ifndef __WXOSX__ // Don't call SetFont under OSX to avoid name cutting in ObjectList
|
#ifndef __WXOSX__ // Don't call SetFont under OSX to avoid name cutting in ObjectList
|
||||||
this->SetFont(m_normal_font);
|
this->SetFont(m_normal_font);
|
||||||
#endif
|
#endif
|
||||||
|
this->CenterOnParent();
|
||||||
|
|
||||||
// Linux specific issue : get_dpi_for_window(this) still doesn't responce to the Display's scale in new wxWidgets(3.1.3).
|
// Linux specific issue : get_dpi_for_window(this) still doesn't responce to the Display's scale in new wxWidgets(3.1.3).
|
||||||
// So, calculate the m_em_unit value from the font size, as before
|
// So, calculate the m_em_unit value from the font size, as before
|
||||||
|
|
|
@ -41,8 +41,8 @@ bool GLGizmoFdmSupports::on_init()
|
||||||
|
|
||||||
m_desc["clipping_of_view"] = _L("Clipping of view") + ": ";
|
m_desc["clipping_of_view"] = _L("Clipping of view") + ": ";
|
||||||
m_desc["reset_direction"] = _L("Reset direction");
|
m_desc["reset_direction"] = _L("Reset direction");
|
||||||
m_desc["cursor_size"] = _L("Cursor size") + ": ";
|
m_desc["cursor_size"] = _L("Brush size") + ": ";
|
||||||
m_desc["cursor_type"] = _L("Cursor type") + ": ";
|
m_desc["cursor_type"] = _L("Brush shape") + ": ";
|
||||||
m_desc["enforce_caption"] = _L("Left mouse button") + ": ";
|
m_desc["enforce_caption"] = _L("Left mouse button") + ": ";
|
||||||
m_desc["enforce"] = _L("Enforce supports");
|
m_desc["enforce"] = _L("Enforce supports");
|
||||||
m_desc["block_caption"] = _L("Right mouse button") + " ";
|
m_desc["block_caption"] = _L("Right mouse button") + " ";
|
||||||
|
@ -232,9 +232,12 @@ void GLGizmoFdmSupports::on_render_input_window(float x, float y, float bottom_l
|
||||||
else {
|
else {
|
||||||
m_imgui->begin(_L("Autoset custom supports"), ImGuiWindowFlags_NoMove | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoCollapse);
|
m_imgui->begin(_L("Autoset custom supports"), ImGuiWindowFlags_NoMove | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoCollapse);
|
||||||
ImGui::AlignTextToFramePadding();
|
ImGui::AlignTextToFramePadding();
|
||||||
m_imgui->text(_L("Threshold:") + " " + _L("deg"));
|
m_imgui->text(_L("Threshold:"));
|
||||||
|
std::string format_str = std::string("%.f") + I18N::translate_utf8("°",
|
||||||
|
"Degree sign to use in the respective slider in FDM supports gizmo,"
|
||||||
|
"placed after the number with no whitespace in between.");
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if (m_imgui->slider_float("", &m_angle_threshold_deg, 0.f, 90.f, "%.f"))
|
if (m_imgui->slider_float("", &m_angle_threshold_deg, 0.f, 90.f, format_str.data()))
|
||||||
m_parent.set_slope_normal_angle(90.f - m_angle_threshold_deg);
|
m_parent.set_slope_normal_angle(90.f - m_angle_threshold_deg);
|
||||||
if (m_imgui->button(_L("Enforce")))
|
if (m_imgui->button(_L("Enforce")))
|
||||||
select_facets_by_angle(m_angle_threshold_deg, false);
|
select_facets_by_angle(m_angle_threshold_deg, false);
|
||||||
|
|
|
@ -37,14 +37,14 @@ void GLGizmoPainterBase::activate_internal_undo_redo_stack(bool activate)
|
||||||
if (activate && ! m_internal_stack_active) {
|
if (activate && ! m_internal_stack_active) {
|
||||||
wxString str = get_painter_type() == PainterGizmoType::FDM_SUPPORTS
|
wxString str = get_painter_type() == PainterGizmoType::FDM_SUPPORTS
|
||||||
? _L("Supports gizmo turned on")
|
? _L("Supports gizmo turned on")
|
||||||
: _L("Seam gizmo turned on");
|
: _L("Paint-on seams on");
|
||||||
Plater::TakeSnapshot(wxGetApp().plater(), str);
|
Plater::TakeSnapshot(wxGetApp().plater(), str);
|
||||||
wxGetApp().plater()->enter_gizmos_stack();
|
wxGetApp().plater()->enter_gizmos_stack();
|
||||||
m_internal_stack_active = true;
|
m_internal_stack_active = true;
|
||||||
}
|
}
|
||||||
if (! activate && m_internal_stack_active) {
|
if (! activate && m_internal_stack_active) {
|
||||||
wxString str = get_painter_type() == PainterGizmoType::SEAM
|
wxString str = get_painter_type() == PainterGizmoType::SEAM
|
||||||
? _L("Seam gizmo turned off")
|
? _L("Paint-on seams off")
|
||||||
: _L("Supports gizmo turned off");
|
: _L("Supports gizmo turned off");
|
||||||
wxGetApp().plater()->leave_gizmos_stack();
|
wxGetApp().plater()->leave_gizmos_stack();
|
||||||
Plater::TakeSnapshot(wxGetApp().plater(), str);
|
Plater::TakeSnapshot(wxGetApp().plater(), str);
|
||||||
|
|
|
@ -200,62 +200,10 @@ void GLGizmoRotate::on_render_for_picking() const
|
||||||
glsafe(::glPopMatrix());
|
glsafe(::glPopMatrix());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
GLGizmoRotate3D::RotoptimzeWindow::RotoptimzeWindow(ImGuiWrapper * imgui,
|
|
||||||
State & state,
|
|
||||||
const Alignment &alignment)
|
|
||||||
: m_imgui{imgui}
|
|
||||||
{
|
|
||||||
imgui->begin(_L("Rotation"), ImGuiWindowFlags_NoMove |
|
|
||||||
ImGuiWindowFlags_AlwaysAutoResize |
|
|
||||||
ImGuiWindowFlags_NoCollapse);
|
|
||||||
|
|
||||||
// adjust window position to avoid overlap the view toolbar
|
|
||||||
float win_h = ImGui::GetWindowHeight();
|
|
||||||
float x = alignment.x, y = alignment.y;
|
|
||||||
y = std::min(y, alignment.bottom_limit - win_h);
|
|
||||||
ImGui::SetWindowPos(ImVec2(x, y), ImGuiCond_Always);
|
|
||||||
|
|
||||||
static constexpr const char * button_txt = L("Optimize orientation");
|
|
||||||
static constexpr const char * slider_txt = L("Accuracy");
|
|
||||||
|
|
||||||
float button_width = imgui->calc_text_size(_(button_txt)).x;
|
|
||||||
ImGui::PushItemWidth(100.);
|
|
||||||
//if (imgui->button(_(button_txt))) {
|
|
||||||
if (ImGui::ArrowButton(_(button_txt).c_str(), ImGuiDir_Down)){
|
|
||||||
std::cout << "Blip" << std::endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::SliderFloat(_(slider_txt).c_str(), &state.accuracy, 0.01f, 1.f, "%.1f");
|
|
||||||
|
|
||||||
static const std::vector<std::string> options = {
|
|
||||||
_L("Least supports").ToStdString(),
|
|
||||||
_L("Suface quality").ToStdString()
|
|
||||||
};
|
|
||||||
|
|
||||||
// if (imgui->combo(_L("Choose method"), options, state.method) ) {
|
|
||||||
// std::cout << "method: " << state.method << std::endl;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
GLGizmoRotate3D::RotoptimzeWindow::~RotoptimzeWindow()
|
|
||||||
{
|
|
||||||
m_imgui->end();
|
|
||||||
}
|
|
||||||
|
|
||||||
void GLGizmoRotate3D::on_render_input_window(float x, float y, float bottom_limit)
|
void GLGizmoRotate3D::on_render_input_window(float x, float y, float bottom_limit)
|
||||||
{
|
{
|
||||||
if (wxGetApp().preset_bundle->printers.get_edited_preset().printer_technology() != ptSLA)
|
if (wxGetApp().preset_bundle->printers.get_edited_preset().printer_technology() != ptSLA)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// TODO:
|
|
||||||
|
|
||||||
// m_rotoptimizewin_state.mobj = ?;
|
|
||||||
// RotoptimzeWindow popup{m_imgui, m_rotoptimizewin_state, {x, y, bottom_limit}};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLGizmoRotate::render_circle() const
|
void GLGizmoRotate::render_circle() const
|
||||||
|
|
|
@ -136,37 +136,6 @@ protected:
|
||||||
}
|
}
|
||||||
|
|
||||||
void on_render_input_window(float x, float y, float bottom_limit) override;
|
void on_render_input_window(float x, float y, float bottom_limit) override;
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
class RotoptimzeWindow {
|
|
||||||
ImGuiWrapper *m_imgui = nullptr;
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
struct State {
|
|
||||||
enum Metods { mMinSupportPoints, mLegacy };
|
|
||||||
|
|
||||||
float accuracy = 1.f;
|
|
||||||
int method = mMinSupportPoints;
|
|
||||||
ModelObject *mobj = nullptr;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct Alignment { float x, y, bottom_limit; };
|
|
||||||
|
|
||||||
RotoptimzeWindow(ImGuiWrapper * imgui,
|
|
||||||
State & state,
|
|
||||||
const Alignment &bottom_limit);
|
|
||||||
|
|
||||||
~RotoptimzeWindow();
|
|
||||||
|
|
||||||
RotoptimzeWindow(const RotoptimzeWindow&) = delete;
|
|
||||||
RotoptimzeWindow(RotoptimzeWindow &&) = delete;
|
|
||||||
RotoptimzeWindow& operator=(const RotoptimzeWindow &) = delete;
|
|
||||||
RotoptimzeWindow& operator=(RotoptimzeWindow &&) = delete;
|
|
||||||
};
|
|
||||||
|
|
||||||
RotoptimzeWindow::State m_rotoptimizewin_state = {};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace GUI
|
} // namespace GUI
|
||||||
|
|
|
@ -24,8 +24,8 @@ bool GLGizmoSeam::on_init()
|
||||||
|
|
||||||
m_desc["clipping_of_view"] = _L("Clipping of view") + ": ";
|
m_desc["clipping_of_view"] = _L("Clipping of view") + ": ";
|
||||||
m_desc["reset_direction"] = _L("Reset direction");
|
m_desc["reset_direction"] = _L("Reset direction");
|
||||||
m_desc["cursor_size"] = _L("Cursor size") + ": ";
|
m_desc["cursor_size"] = _L("Brush size") + ": ";
|
||||||
m_desc["cursor_type"] = _L("Cursor type") + ": ";
|
m_desc["cursor_type"] = _L("Brush shape") + ": ";
|
||||||
m_desc["enforce_caption"] = _L("Left mouse button") + ": ";
|
m_desc["enforce_caption"] = _L("Left mouse button") + ": ";
|
||||||
m_desc["enforce"] = _L("Enforce seam");
|
m_desc["enforce"] = _L("Enforce seam");
|
||||||
m_desc["block_caption"] = _L("Right mouse button") + " ";
|
m_desc["block_caption"] = _L("Right mouse button") + " ";
|
||||||
|
|
|
@ -49,7 +49,9 @@ static const std::map<const char, std::string> font_icons = {
|
||||||
{ImGui::MinimalizeMarker , "notification_minimalize" },
|
{ImGui::MinimalizeMarker , "notification_minimalize" },
|
||||||
{ImGui::MinimalizeHoverMarker , "notification_minimalize_hover" },
|
{ImGui::MinimalizeHoverMarker , "notification_minimalize_hover" },
|
||||||
{ImGui::WarningMarker , "notification_warning" },
|
{ImGui::WarningMarker , "notification_warning" },
|
||||||
{ImGui::ErrorMarker , "notification_error" }
|
{ImGui::ErrorMarker , "notification_error" },
|
||||||
|
{ImGui::EjectMarker , "notification_eject_sd" },
|
||||||
|
{ImGui::EjectHoverMarker , "notification_eject_sd_hover" },
|
||||||
};
|
};
|
||||||
|
|
||||||
const ImVec4 ImGuiWrapper::COL_GREY_DARK = { 0.333f, 0.333f, 0.333f, 1.0f };
|
const ImVec4 ImGuiWrapper::COL_GREY_DARK = { 0.333f, 0.333f, 0.333f, 1.0f };
|
||||||
|
|
|
@ -34,9 +34,9 @@ namespace GUI {
|
||||||
|
|
||||||
KBShortcutsDialog::KBShortcutsDialog()
|
KBShortcutsDialog::KBShortcutsDialog()
|
||||||
#if ENABLE_GCODE_VIEWER
|
#if ENABLE_GCODE_VIEWER
|
||||||
: DPIDialog(NULL, wxID_ANY, wxString(wxGetApp().is_editor() ? SLIC3R_APP_NAME : GCODEVIEWER_APP_NAME) + " - " + _L("Keyboard Shortcuts"),
|
: DPIDialog((wxWindow*)wxGetApp().mainframe, wxID_ANY, wxString(wxGetApp().is_editor() ? SLIC3R_APP_NAME : GCODEVIEWER_APP_NAME) + " - " + _L("Keyboard Shortcuts"),
|
||||||
#else
|
#else
|
||||||
: DPIDialog(NULL, wxID_ANY, wxString(SLIC3R_APP_NAME) + " - " + _L("Keyboard Shortcuts"),
|
: DPIDialog((wxWindow*)wxGetApp().mainframe, wxID_ANY, wxString(SLIC3R_APP_NAME) + " - " + _L("Keyboard Shortcuts"),
|
||||||
#endif // ENABLE_GCODE_VIEWER
|
#endif // ENABLE_GCODE_VIEWER
|
||||||
wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
|
wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
|
||||||
{
|
{
|
||||||
|
@ -213,7 +213,7 @@ void KBShortcutsDialog::fill_shortcuts()
|
||||||
{ L("Arrow Down"), L("Lower Layer") },
|
{ L("Arrow Down"), L("Lower Layer") },
|
||||||
{ "U", L("Upper Layer") },
|
{ "U", L("Upper Layer") },
|
||||||
{ "D", L("Lower Layer") },
|
{ "D", L("Lower Layer") },
|
||||||
{ "L", L("Show/Hide Legend/Estimated printing time") },
|
{ "L", L("Show/Hide Legend & Estimated printing time") },
|
||||||
};
|
};
|
||||||
|
|
||||||
m_full_shortcuts.push_back(std::make_pair(_L("Preview"), preview_shortcuts));
|
m_full_shortcuts.push_back(std::make_pair(_L("Preview"), preview_shortcuts));
|
||||||
|
|
|
@ -238,6 +238,17 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_S
|
||||||
event.Skip();
|
event.Skip();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// OSX specific issue:
|
||||||
|
// When we move application between Retina and non-Retina displays, The legend on a canvas doesn't redraw
|
||||||
|
// So, redraw explicitly canvas, when application is moved
|
||||||
|
#ifdef ENABLE_RETINA_GL
|
||||||
|
Bind(wxEVT_MOVE, [this](wxMoveEvent& event) {
|
||||||
|
wxGetApp().plater()->get_current_canvas3D()->set_as_dirty();
|
||||||
|
wxGetApp().plater()->get_current_canvas3D()->request_extra_frame();
|
||||||
|
event.Skip();
|
||||||
|
});
|
||||||
|
#endif
|
||||||
|
|
||||||
wxGetApp().persist_window_geometry(this, true);
|
wxGetApp().persist_window_geometry(this, true);
|
||||||
wxGetApp().persist_window_geometry(&m_settings_dialog, true);
|
wxGetApp().persist_window_geometry(&m_settings_dialog, true);
|
||||||
|
|
||||||
|
@ -1044,7 +1055,7 @@ void MainFrame::init_menubar()
|
||||||
[this](wxCommandEvent&) { if (m_plater) m_plater->add_model(true); }, "import_plater", nullptr,
|
[this](wxCommandEvent&) { if (m_plater) m_plater->add_model(true); }, "import_plater", nullptr,
|
||||||
[this](){return m_plater != nullptr; }, this);
|
[this](){return m_plater != nullptr; }, this);
|
||||||
|
|
||||||
append_menu_item(import_menu, wxID_ANY, _L("Import SL1 archive") + dots, _L("Load an SL1 output archive"),
|
append_menu_item(import_menu, wxID_ANY, _L("Import SL1 archive") + dots, _L("Load an SL1 archive"),
|
||||||
[this](wxCommandEvent&) { if (m_plater) m_plater->import_sl1_archive(); }, "import_plater", nullptr,
|
[this](wxCommandEvent&) { if (m_plater) m_plater->import_sl1_archive(); }, "import_plater", nullptr,
|
||||||
[this](){return m_plater != nullptr; }, this);
|
[this](){return m_plater != nullptr; }, this);
|
||||||
|
|
||||||
|
@ -1202,7 +1213,7 @@ void MainFrame::init_menubar()
|
||||||
|
|
||||||
editMenu->AppendSeparator();
|
editMenu->AppendSeparator();
|
||||||
append_menu_item(editMenu, wxID_ANY, _L("Searc&h") + "\tCtrl+F",
|
append_menu_item(editMenu, wxID_ANY, _L("Searc&h") + "\tCtrl+F",
|
||||||
_L("Find option"), [this](wxCommandEvent&) { m_plater->search(/*m_tabpanel->GetCurrentPage() == */m_plater->IsShown()); },
|
_L("Search in settings"), [this](wxCommandEvent&) { m_plater->search(/*m_tabpanel->GetCurrentPage() == */m_plater->IsShown()); },
|
||||||
"search", nullptr, []() {return true; }, this);
|
"search", nullptr, []() {return true; }, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#include "NotificationManager.hpp"
|
#include "NotificationManager.hpp"
|
||||||
|
|
||||||
#include "GUI_App.hpp"
|
#include "GUI_App.hpp"
|
||||||
|
#include "GUI.hpp"
|
||||||
#include "Plater.hpp"
|
#include "Plater.hpp"
|
||||||
#include "GLCanvas3D.hpp"
|
#include "GLCanvas3D.hpp"
|
||||||
#include "ImGuiWrapper.hpp"
|
#include "ImGuiWrapper.hpp"
|
||||||
|
@ -33,6 +34,56 @@ namespace Notifications_Internal{
|
||||||
else
|
else
|
||||||
ImGui::PushStyleColor(idx, col);
|
ImGui::PushStyleColor(idx, col);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void open_folder(const std::string& path)
|
||||||
|
{
|
||||||
|
// Code taken from desktop_open_datadir_folder()
|
||||||
|
|
||||||
|
// Execute command to open a file explorer, platform dependent.
|
||||||
|
// FIXME: The const_casts aren't needed in wxWidgets 3.1, remove them when we upgrade.
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
const wxString widepath = from_u8(path);
|
||||||
|
const wchar_t* argv[] = { L"explorer", widepath.GetData(), nullptr };
|
||||||
|
::wxExecute(const_cast<wchar_t**>(argv), wxEXEC_ASYNC, nullptr);
|
||||||
|
#elif __APPLE__
|
||||||
|
const char* argv[] = { "open", path.data(), nullptr };
|
||||||
|
::wxExecute(const_cast<char**>(argv), wxEXEC_ASYNC, nullptr);
|
||||||
|
#else
|
||||||
|
const char* argv[] = { "xdg-open", path.data(), nullptr };
|
||||||
|
|
||||||
|
// Check if we're running in an AppImage container, if so, we need to remove AppImage's env vars,
|
||||||
|
// because they may mess up the environment expected by the file manager.
|
||||||
|
// Mostly this is about LD_LIBRARY_PATH, but we remove a few more too for good measure.
|
||||||
|
if (wxGetEnv("APPIMAGE", nullptr)) {
|
||||||
|
// We're running from AppImage
|
||||||
|
wxEnvVariableHashMap env_vars;
|
||||||
|
wxGetEnvMap(&env_vars);
|
||||||
|
|
||||||
|
env_vars.erase("APPIMAGE");
|
||||||
|
env_vars.erase("APPDIR");
|
||||||
|
env_vars.erase("LD_LIBRARY_PATH");
|
||||||
|
env_vars.erase("LD_PRELOAD");
|
||||||
|
env_vars.erase("UNION_PRELOAD");
|
||||||
|
|
||||||
|
wxExecuteEnv exec_env;
|
||||||
|
exec_env.env = std::move(env_vars);
|
||||||
|
|
||||||
|
wxString owd;
|
||||||
|
if (wxGetEnv("OWD", &owd)) {
|
||||||
|
// This is the original work directory from which the AppImage image was run,
|
||||||
|
// set it as CWD for the child process:
|
||||||
|
exec_env.cwd = std::move(owd);
|
||||||
|
}
|
||||||
|
|
||||||
|
::wxExecute(const_cast<char**>(argv), wxEXEC_ASYNC, nullptr, &exec_env);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Looks like we're NOT running from AppImage, we'll make no changes to the environment.
|
||||||
|
::wxExecute(const_cast<char**>(argv), wxEXEC_ASYNC, nullptr, nullptr);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
|
@ -183,6 +234,7 @@ NotificationManager::PopNotification::RenderResult NotificationManager::PopNotif
|
||||||
render_left_sign(imgui);
|
render_left_sign(imgui);
|
||||||
render_text(imgui, win_size.x, win_size.y, win_pos.x, win_pos.y);
|
render_text(imgui, win_size.x, win_size.y, win_pos.x, win_pos.y);
|
||||||
render_close_button(imgui, win_size.x, win_size.y, win_pos.x, win_pos.y);
|
render_close_button(imgui, win_size.x, win_size.y, win_pos.x, win_pos.y);
|
||||||
|
m_minimize_b_visible = false;
|
||||||
if (m_multiline && m_lines_count > 3)
|
if (m_multiline && m_lines_count > 3)
|
||||||
render_minimize_button(imgui, win_pos.x, win_pos.y);
|
render_minimize_button(imgui, win_pos.x, win_pos.y);
|
||||||
} else {
|
} else {
|
||||||
|
@ -205,12 +257,8 @@ NotificationManager::PopNotification::RenderResult NotificationManager::PopNotif
|
||||||
ImGui::PopStyleColor();
|
ImGui::PopStyleColor();
|
||||||
return ret_val;
|
return ret_val;
|
||||||
}
|
}
|
||||||
void NotificationManager::PopNotification::init()
|
void NotificationManager::PopNotification::count_spaces()
|
||||||
{
|
{
|
||||||
std::string text = m_text1 + " " + m_hypertext;
|
|
||||||
int last_end = 0;
|
|
||||||
m_lines_count = 0;
|
|
||||||
|
|
||||||
//determine line width
|
//determine line width
|
||||||
m_line_height = ImGui::CalcTextSize("A").y;
|
m_line_height = ImGui::CalcTextSize("A").y;
|
||||||
|
|
||||||
|
@ -221,8 +269,16 @@ void NotificationManager::PopNotification::init()
|
||||||
float picture_width = ImGui::CalcTextSize(text.c_str()).x;
|
float picture_width = ImGui::CalcTextSize(text.c_str()).x;
|
||||||
m_left_indentation = picture_width + m_line_height / 2;
|
m_left_indentation = picture_width + m_line_height / 2;
|
||||||
}
|
}
|
||||||
m_window_width_offset = m_left_indentation + m_line_height * 2;
|
m_window_width_offset = m_left_indentation + m_line_height * 3.f;
|
||||||
m_window_width = m_line_height * 25;
|
m_window_width = m_line_height * 25;
|
||||||
|
}
|
||||||
|
void NotificationManager::PopNotification::init()
|
||||||
|
{
|
||||||
|
std::string text = m_text1 + " " + m_hypertext;
|
||||||
|
int last_end = 0;
|
||||||
|
m_lines_count = 0;
|
||||||
|
|
||||||
|
count_spaces();
|
||||||
|
|
||||||
// count lines
|
// count lines
|
||||||
m_endlines.clear();
|
m_endlines.clear();
|
||||||
|
@ -233,10 +289,9 @@ void NotificationManager::PopNotification::init()
|
||||||
//next line is ended by '/n'
|
//next line is ended by '/n'
|
||||||
m_endlines.push_back(next_hard_end);
|
m_endlines.push_back(next_hard_end);
|
||||||
last_end = next_hard_end + 1;
|
last_end = next_hard_end + 1;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
// find next suitable endline
|
// find next suitable endline
|
||||||
if (ImGui::CalcTextSize(text.substr(last_end).c_str()).x >= m_window_width - 3.5f * m_line_height) {// m_window_width_offset) {
|
if (ImGui::CalcTextSize(text.substr(last_end).c_str()).x >= m_window_width - m_window_width_offset) {
|
||||||
// more than one line till end
|
// more than one line till end
|
||||||
int next_space = text.find_first_of(' ', last_end);
|
int next_space = text.find_first_of(' ', last_end);
|
||||||
if (next_space > 0) {
|
if (next_space > 0) {
|
||||||
|
@ -245,8 +300,19 @@ void NotificationManager::PopNotification::init()
|
||||||
next_space = next_space_candidate;
|
next_space = next_space_candidate;
|
||||||
next_space_candidate = text.find_first_of(' ', next_space + 1);
|
next_space_candidate = text.find_first_of(' ', next_space + 1);
|
||||||
}
|
}
|
||||||
m_endlines.push_back(next_space);
|
// when one word longer than line.
|
||||||
last_end = next_space + 1;
|
if (ImGui::CalcTextSize(text.substr(last_end, next_space - last_end).c_str()).x > m_window_width - m_window_width_offset) {
|
||||||
|
float width_of_a = ImGui::CalcTextSize("a").x;
|
||||||
|
int letter_count = (int)((m_window_width - m_window_width_offset) / width_of_a);
|
||||||
|
while (last_end + letter_count < text.size() && ImGui::CalcTextSize(text.substr(last_end, letter_count).c_str()).x < m_window_width - m_window_width_offset) {
|
||||||
|
letter_count++;
|
||||||
|
}
|
||||||
|
m_endlines.push_back(last_end + letter_count);
|
||||||
|
last_end += letter_count;
|
||||||
|
} else {
|
||||||
|
m_endlines.push_back(next_space);
|
||||||
|
last_end = next_space + 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -257,6 +323,8 @@ void NotificationManager::PopNotification::init()
|
||||||
}
|
}
|
||||||
m_lines_count++;
|
m_lines_count++;
|
||||||
}
|
}
|
||||||
|
if (m_lines_count == 3)
|
||||||
|
m_multiline = true;
|
||||||
m_initialized = true;
|
m_initialized = true;
|
||||||
}
|
}
|
||||||
void NotificationManager::PopNotification::set_next_window_size(ImGuiWrapper& imgui)
|
void NotificationManager::PopNotification::set_next_window_size(ImGuiWrapper& imgui)
|
||||||
|
@ -285,7 +353,8 @@ void NotificationManager::PopNotification::render_text(ImGuiWrapper& imgui, cons
|
||||||
float shift_y = m_line_height;// -m_line_height / 20;
|
float shift_y = m_line_height;// -m_line_height / 20;
|
||||||
for (size_t i = 0; i < m_lines_count; i++) {
|
for (size_t i = 0; i < m_lines_count; i++) {
|
||||||
std::string line = m_text1.substr(last_end , m_endlines[i] - last_end);
|
std::string line = m_text1.substr(last_end , m_endlines[i] - last_end);
|
||||||
last_end = m_endlines[i] + 1;
|
if(i < m_lines_count - 1)
|
||||||
|
last_end = m_endlines[i] + (m_text1[m_endlines[i]] == '\n' || m_text1[m_endlines[i]] == ' ' ? 1 : 0);
|
||||||
ImGui::SetCursorPosX(x_offset);
|
ImGui::SetCursorPosX(x_offset);
|
||||||
ImGui::SetCursorPosY(starting_y + i * shift_y);
|
ImGui::SetCursorPosY(starting_y + i * shift_y);
|
||||||
imgui.text(line.c_str());
|
imgui.text(line.c_str());
|
||||||
|
@ -303,7 +372,7 @@ void NotificationManager::PopNotification::render_text(ImGuiWrapper& imgui, cons
|
||||||
ImGui::SetCursorPosY(win_size.y / 2 - win_size.y / 6 - m_line_height / 2);
|
ImGui::SetCursorPosY(win_size.y / 2 - win_size.y / 6 - m_line_height / 2);
|
||||||
imgui.text(m_text1.substr(0, m_endlines[0]).c_str());
|
imgui.text(m_text1.substr(0, m_endlines[0]).c_str());
|
||||||
// line2
|
// line2
|
||||||
std::string line = m_text1.substr(m_endlines[0] + 1, m_endlines[1] - m_endlines[0] - 1);
|
std::string line = m_text1.substr(m_endlines[0] + (m_text1[m_endlines[0]] == '\n' || m_text1[m_endlines[0]] == ' ' ? 1 : 0), m_endlines[1] - m_endlines[0] - (m_text1[m_endlines[0]] == '\n' || m_text1[m_endlines[0]] == ' ' ? 1 : 0));
|
||||||
if (ImGui::CalcTextSize(line.c_str()).x > m_window_width - m_window_width_offset - ImGui::CalcTextSize((".." + _u8L("More")).c_str()).x)
|
if (ImGui::CalcTextSize(line.c_str()).x > m_window_width - m_window_width_offset - ImGui::CalcTextSize((".." + _u8L("More")).c_str()).x)
|
||||||
{
|
{
|
||||||
line = line.substr(0, line.length() - 6);
|
line = line.substr(0, line.length() - 6);
|
||||||
|
@ -326,7 +395,7 @@ void NotificationManager::PopNotification::render_text(ImGuiWrapper& imgui, cons
|
||||||
ImGui::SetCursorPosY(win_size.y / 2 - win_size.y / 6 - m_line_height / 2);
|
ImGui::SetCursorPosY(win_size.y / 2 - win_size.y / 6 - m_line_height / 2);
|
||||||
imgui.text(m_text1.substr(0, m_endlines[0]).c_str());
|
imgui.text(m_text1.substr(0, m_endlines[0]).c_str());
|
||||||
// line2
|
// line2
|
||||||
std::string line = m_text1.substr(m_endlines[0] + 1);
|
std::string line = m_text1.substr(m_endlines[0] + (m_text1[m_endlines[0]] == '\n' || m_text1[m_endlines[0]] == ' ' ? 1 : 0));
|
||||||
cursor_y = win_size.y / 2 + win_size.y / 6 - m_line_height / 2;
|
cursor_y = win_size.y / 2 + win_size.y / 6 - m_line_height / 2;
|
||||||
ImGui::SetCursorPosX(x_offset);
|
ImGui::SetCursorPosX(x_offset);
|
||||||
ImGui::SetCursorPosY(cursor_y);
|
ImGui::SetCursorPosY(cursor_y);
|
||||||
|
@ -375,8 +444,7 @@ void NotificationManager::PopNotification::render_hypertext(ImGuiWrapper& imgui,
|
||||||
set_next_window_size(imgui);
|
set_next_window_size(imgui);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
on_text_click();
|
m_close_pending = on_text_click();
|
||||||
m_close_pending = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ImGui::PopStyleColor();
|
ImGui::PopStyleColor();
|
||||||
|
@ -407,7 +475,7 @@ void NotificationManager::PopNotification::render_hypertext(ImGuiWrapper& imgui,
|
||||||
void NotificationManager::PopNotification::render_close_button(ImGuiWrapper& imgui, const float win_size_x, const float win_size_y, const float win_pos_x, const float win_pos_y)
|
void NotificationManager::PopNotification::render_close_button(ImGuiWrapper& imgui, const float win_size_x, const float win_size_y, const float win_pos_x, const float win_pos_y)
|
||||||
{
|
{
|
||||||
ImVec2 win_size(win_size_x, win_size_y);
|
ImVec2 win_size(win_size_x, win_size_y);
|
||||||
ImVec2 win_pos(win_pos_x, win_pos_y);
|
ImVec2 win_pos(win_pos_x, win_pos_y);
|
||||||
ImVec4 orange_color = ImGui::GetStyleColorVec4(ImGuiCol_Button);
|
ImVec4 orange_color = ImGui::GetStyleColorVec4(ImGuiCol_Button);
|
||||||
orange_color.w = 0.8f;
|
orange_color.w = 0.8f;
|
||||||
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(.0f, .0f, .0f, .0f));
|
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(.0f, .0f, .0f, .0f));
|
||||||
|
@ -422,7 +490,7 @@ void NotificationManager::PopNotification::render_close_button(ImGuiWrapper& img
|
||||||
button_text = ImGui::CloseIconMarker;
|
button_text = ImGui::CloseIconMarker;
|
||||||
|
|
||||||
if (ImGui::IsMouseHoveringRect(ImVec2(win_pos.x - win_size.x / 10.f, win_pos.y),
|
if (ImGui::IsMouseHoveringRect(ImVec2(win_pos.x - win_size.x / 10.f, win_pos.y),
|
||||||
ImVec2(win_pos.x, win_pos.y + win_size.y - (m_multiline? 2 * m_line_height : 0)),
|
ImVec2(win_pos.x, win_pos.y + win_size.y - ( m_minimize_b_visible ? 2 * m_line_height : 0)),
|
||||||
true))
|
true))
|
||||||
{
|
{
|
||||||
button_text = ImGui::CloseIconHoverMarker;
|
button_text = ImGui::CloseIconHoverMarker;
|
||||||
|
@ -435,11 +503,10 @@ void NotificationManager::PopNotification::render_close_button(ImGuiWrapper& img
|
||||||
{
|
{
|
||||||
m_close_pending = true;
|
m_close_pending = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//invisible large button
|
//invisible large button
|
||||||
ImGui::SetCursorPosX(win_size.x - win_size.x / 10.f);
|
ImGui::SetCursorPosX(win_size.x - m_line_height * 2.125);
|
||||||
ImGui::SetCursorPosY(0);
|
ImGui::SetCursorPosY(0);
|
||||||
if (imgui.button(" ", win_size.x / 10.f, win_size.y - (m_multiline ? 2 * m_line_height : 0)))
|
if (imgui.button(" ", m_line_height * 2.125, win_size.y - ( m_minimize_b_visible ? 2 * m_line_height : 0)))
|
||||||
{
|
{
|
||||||
m_close_pending = true;
|
m_close_pending = true;
|
||||||
}
|
}
|
||||||
|
@ -540,15 +607,12 @@ void NotificationManager::PopNotification::render_minimize_button(ImGuiWrapper&
|
||||||
ImGui::PopStyleColor();
|
ImGui::PopStyleColor();
|
||||||
ImGui::PopStyleColor();
|
ImGui::PopStyleColor();
|
||||||
ImGui::PopStyleColor();
|
ImGui::PopStyleColor();
|
||||||
|
m_minimize_b_visible = true;
|
||||||
}
|
}
|
||||||
void NotificationManager::PopNotification::on_text_click()
|
bool NotificationManager::PopNotification::on_text_click()
|
||||||
{
|
{
|
||||||
|
bool ret = true;
|
||||||
switch (m_data.type) {
|
switch (m_data.type) {
|
||||||
case NotificationType::ExportToRemovableFinished :
|
|
||||||
assert(m_evt_handler != nullptr);
|
|
||||||
if (m_evt_handler != nullptr)
|
|
||||||
wxPostEvent(m_evt_handler, EjectDriveNotificationClickedEvent(EVT_EJECT_DRIVE_NOTIFICAION_CLICKED));
|
|
||||||
break;
|
|
||||||
case NotificationType::SlicingComplete :
|
case NotificationType::SlicingComplete :
|
||||||
//wxGetApp().plater()->export_gcode(false);
|
//wxGetApp().plater()->export_gcode(false);
|
||||||
assert(m_evt_handler != nullptr);
|
assert(m_evt_handler != nullptr);
|
||||||
|
@ -567,6 +631,7 @@ void NotificationManager::PopNotification::on_text_click()
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
void NotificationManager::PopNotification::update(const NotificationData& n)
|
void NotificationManager::PopNotification::update(const NotificationData& n)
|
||||||
{
|
{
|
||||||
|
@ -633,6 +698,127 @@ void NotificationManager::SlicingCompleteLargeNotification::set_large(bool l)
|
||||||
m_hypertext = l ? _u8L("Export G-Code.") : std::string();
|
m_hypertext = l ? _u8L("Export G-Code.") : std::string();
|
||||||
m_hidden = !l;
|
m_hidden = !l;
|
||||||
}
|
}
|
||||||
|
//---------------ExportFinishedNotification-----------
|
||||||
|
void NotificationManager::ExportFinishedNotification::count_spaces()
|
||||||
|
{
|
||||||
|
//determine line width
|
||||||
|
m_line_height = ImGui::CalcTextSize("A").y;
|
||||||
|
|
||||||
|
m_left_indentation = m_line_height;
|
||||||
|
if (m_data.level == NotificationLevel::ErrorNotification || m_data.level == NotificationLevel::WarningNotification) {
|
||||||
|
std::string text;
|
||||||
|
text = (m_data.level == NotificationLevel::ErrorNotification ? ImGui::ErrorMarker : ImGui::WarningMarker);
|
||||||
|
float picture_width = ImGui::CalcTextSize(text.c_str()).x;
|
||||||
|
m_left_indentation = picture_width + m_line_height / 2;
|
||||||
|
}
|
||||||
|
//TODO count this properly
|
||||||
|
m_window_width_offset = m_left_indentation + m_line_height * (m_to_removable ? 5.f : 3.f);
|
||||||
|
m_window_width = m_line_height * 25;
|
||||||
|
}
|
||||||
|
|
||||||
|
void NotificationManager::ExportFinishedNotification::render_text(ImGuiWrapper& imgui, const float win_size_x, const float win_size_y, const float win_pos_x, const float win_pos_y)
|
||||||
|
{
|
||||||
|
|
||||||
|
ImVec2 win_size(win_size_x, win_size_y);
|
||||||
|
ImVec2 win_pos(win_pos_x, win_pos_y);
|
||||||
|
float x_offset = m_left_indentation;
|
||||||
|
std::string fulltext = m_text1 + m_hypertext; //+ m_text2;
|
||||||
|
ImVec2 text_size = ImGui::CalcTextSize(fulltext.c_str());
|
||||||
|
// Lines are always at least two and m_multiline is always true for ExportFinishedNotification.
|
||||||
|
// First line has "Export Finished" text and than hyper text open folder.
|
||||||
|
// Following lines are path to gcode.
|
||||||
|
int last_end = 0;
|
||||||
|
float starting_y = m_line_height / 2;//10;
|
||||||
|
float shift_y = m_line_height;// -m_line_height / 20;
|
||||||
|
for (size_t i = 0; i < m_lines_count; i++) {
|
||||||
|
std::string line = m_text1.substr(last_end, m_endlines[i] - last_end);
|
||||||
|
if (i < m_lines_count - 1)
|
||||||
|
last_end = m_endlines[i] + (m_text1[m_endlines[i]] == '\n' || m_text1[m_endlines[i]] == ' ' ? 1 : 0);
|
||||||
|
ImGui::SetCursorPosX(x_offset);
|
||||||
|
ImGui::SetCursorPosY(starting_y + i * shift_y);
|
||||||
|
imgui.text(line.c_str());
|
||||||
|
//hyperlink text
|
||||||
|
if ( i == 0 ) {
|
||||||
|
render_hypertext(imgui, x_offset + ImGui::CalcTextSize(m_text1.substr(0, last_end).c_str()).x + ImGui::CalcTextSize(" ").x, starting_y, _u8L("Open Folder."));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void NotificationManager::ExportFinishedNotification::render_close_button(ImGuiWrapper& imgui, const float win_size_x, const float win_size_y, const float win_pos_x, const float win_pos_y)
|
||||||
|
{
|
||||||
|
PopNotification::render_close_button(imgui, win_size_x, win_size_y, win_pos_x, win_pos_y);
|
||||||
|
if(m_to_removable)
|
||||||
|
render_eject_button(imgui, win_size_x, win_size_y, win_pos_x, win_pos_y);
|
||||||
|
}
|
||||||
|
|
||||||
|
void NotificationManager::ExportFinishedNotification::render_eject_button(ImGuiWrapper& imgui, const float win_size_x, const float win_size_y, const float win_pos_x, const float win_pos_y)
|
||||||
|
{
|
||||||
|
ImVec2 win_size(win_size_x, win_size_y);
|
||||||
|
ImVec2 win_pos(win_pos_x, win_pos_y);
|
||||||
|
ImVec4 orange_color = ImGui::GetStyleColorVec4(ImGuiCol_Button);
|
||||||
|
orange_color.w = 0.8f;
|
||||||
|
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(.0f, .0f, .0f, .0f));
|
||||||
|
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(.0f, .0f, .0f, .0f));
|
||||||
|
Notifications_Internal::push_style_color(ImGuiCol_Text, ImVec4(1.f, 1.f, 1.f, 1.f), m_fading_out, m_current_fade_opacity);
|
||||||
|
Notifications_Internal::push_style_color(ImGuiCol_TextSelectedBg, ImVec4(0, .75f, .75f, 1.f), m_fading_out, m_current_fade_opacity);
|
||||||
|
ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(.0f, .0f, .0f, .0f));
|
||||||
|
|
||||||
|
std::string button_text;
|
||||||
|
button_text = ImGui::EjectMarker;
|
||||||
|
|
||||||
|
if (ImGui::IsMouseHoveringRect(ImVec2(win_pos.x - m_line_height * 4.5f, win_pos.y),
|
||||||
|
ImVec2(win_pos.x - m_line_height * 2.5f, win_pos.y + win_size.y),
|
||||||
|
true))
|
||||||
|
{
|
||||||
|
button_text = ImGui::EjectHoverMarker;
|
||||||
|
// tooltip
|
||||||
|
long time_now = wxGetLocalTime();
|
||||||
|
if (m_hover_time > 0 && m_hover_time < time_now) {
|
||||||
|
ImGui::PushStyleColor(ImGuiCol_PopupBg, ImGuiWrapper::COL_WINDOW_BACKGROUND);
|
||||||
|
ImGui::BeginTooltip();
|
||||||
|
imgui.text(_u8L("Eject drive"));
|
||||||
|
ImGui::EndTooltip();
|
||||||
|
ImGui::PopStyleColor();
|
||||||
|
}
|
||||||
|
if (m_hover_time == 0)
|
||||||
|
m_hover_time = time_now;
|
||||||
|
} else
|
||||||
|
m_hover_time = 0;
|
||||||
|
|
||||||
|
ImVec2 button_pic_size = ImGui::CalcTextSize(button_text.c_str());
|
||||||
|
ImVec2 button_size(button_pic_size.x * 1.25f, button_pic_size.y * 1.25f);
|
||||||
|
ImGui::SetCursorPosX(win_size.x - m_line_height * 4.f);
|
||||||
|
ImGui::SetCursorPosY(win_size.y / 2 - button_size.y / 2);
|
||||||
|
if (imgui.button(button_text.c_str(), button_size.x, button_size.y))
|
||||||
|
{
|
||||||
|
assert(m_evt_handler != nullptr);
|
||||||
|
if (m_evt_handler != nullptr)
|
||||||
|
wxPostEvent(m_evt_handler, EjectDriveNotificationClickedEvent(EVT_EJECT_DRIVE_NOTIFICAION_CLICKED));
|
||||||
|
m_close_pending = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//invisible large button
|
||||||
|
ImGui::SetCursorPosX(win_size.x - m_line_height * 4.625f);
|
||||||
|
ImGui::SetCursorPosY(0);
|
||||||
|
if (imgui.button(" ", m_line_height * 2.f, win_size.y))
|
||||||
|
{
|
||||||
|
assert(m_evt_handler != nullptr);
|
||||||
|
if (m_evt_handler != nullptr)
|
||||||
|
wxPostEvent(m_evt_handler, EjectDriveNotificationClickedEvent(EVT_EJECT_DRIVE_NOTIFICAION_CLICKED));
|
||||||
|
m_close_pending = true;
|
||||||
|
}
|
||||||
|
ImGui::PopStyleColor();
|
||||||
|
ImGui::PopStyleColor();
|
||||||
|
ImGui::PopStyleColor();
|
||||||
|
ImGui::PopStyleColor();
|
||||||
|
ImGui::PopStyleColor();
|
||||||
|
}
|
||||||
|
bool NotificationManager::ExportFinishedNotification::on_text_click()
|
||||||
|
{
|
||||||
|
Notifications_Internal::open_folder(m_export_dir_path);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
//------NotificationManager--------
|
//------NotificationManager--------
|
||||||
NotificationManager::NotificationManager(wxEvtHandler* evt_handler) :
|
NotificationManager::NotificationManager(wxEvtHandler* evt_handler) :
|
||||||
m_evt_handler(evt_handler)
|
m_evt_handler(evt_handler)
|
||||||
|
@ -789,6 +975,13 @@ void NotificationManager::remove_slicing_warnings_of_released_objects(const std:
|
||||||
notification->close();
|
notification->close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
void NotificationManager::push_exporting_finished_notification(GLCanvas3D& canvas, std::string path, std::string dir_path, bool on_removable)
|
||||||
|
{
|
||||||
|
close_notification_of_type(NotificationType::ExportFinished);
|
||||||
|
NotificationData data{ NotificationType::ExportFinished, NotificationLevel::RegularNotification, 0, _u8L("Exporting finished.") +"\n"+ path };
|
||||||
|
push_notification_data(std::make_unique<NotificationManager::ExportFinishedNotification>(data, m_id_provider, m_evt_handler, on_removable, path, dir_path),
|
||||||
|
canvas, 0);
|
||||||
|
}
|
||||||
bool NotificationManager::push_notification_data(const NotificationData ¬ification_data, GLCanvas3D& canvas, int timestamp)
|
bool NotificationManager::push_notification_data(const NotificationData ¬ification_data, GLCanvas3D& canvas, int timestamp)
|
||||||
{
|
{
|
||||||
return push_notification_data(std::make_unique<PopNotification>(notification_data, m_id_provider, m_evt_handler), canvas, timestamp);
|
return push_notification_data(std::make_unique<PopNotification>(notification_data, m_id_provider, m_evt_handler), canvas, timestamp);
|
||||||
|
@ -822,7 +1015,7 @@ void NotificationManager::render_notifications(GLCanvas3D& canvas, float overlay
|
||||||
bool hovered = false;
|
bool hovered = false;
|
||||||
sort_notifications();
|
sort_notifications();
|
||||||
// iterate thru notifications and render them / erease them
|
// iterate thru notifications and render them / erease them
|
||||||
for (auto it = m_pop_notifications.begin(); it != m_pop_notifications.end();) {
|
for (auto it = m_pop_notifications.begin(); it != m_pop_notifications.end();) {
|
||||||
if ((*it)->get_finished()) {
|
if ((*it)->get_finished()) {
|
||||||
it = m_pop_notifications.erase(it);
|
it = m_pop_notifications.erase(it);
|
||||||
} else {
|
} else {
|
||||||
|
@ -931,5 +1124,31 @@ bool NotificationManager::has_slicing_error_notification()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void NotificationManager::new_export_began(bool on_removable)
|
||||||
|
{
|
||||||
|
close_notification_of_type(NotificationType::ExportFinished);
|
||||||
|
// If we want to hold information of ejecting removable on later export finished notifications
|
||||||
|
/*
|
||||||
|
for (std::unique_ptr<PopNotification>& notification : m_pop_notifications) {
|
||||||
|
if (notification->get_type() == NotificationType::ExportToRemovableFinished) {
|
||||||
|
if (!on_removable) {
|
||||||
|
const NotificationData old_data = notification->get_data();
|
||||||
|
notification->update( {old_data.type, old_data.level ,old_data.duration, std::string(), old_data.hypertext} );
|
||||||
|
} else {
|
||||||
|
notification->close();
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
void NotificationManager::device_ejected()
|
||||||
|
{
|
||||||
|
for (std::unique_ptr<PopNotification>& notification : m_pop_notifications) {
|
||||||
|
if (notification->get_type() == NotificationType::ExportFinished && dynamic_cast<ExportFinishedNotification*>(notification.get())->m_to_removable)
|
||||||
|
notification->close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}//namespace GUI
|
}//namespace GUI
|
||||||
}//namespace Slic3r
|
}//namespace Slic3r
|
||||||
|
|
|
@ -32,7 +32,11 @@ enum class NotificationType
|
||||||
SlicingComplete,
|
SlicingComplete,
|
||||||
// SlicingNotPossible,
|
// SlicingNotPossible,
|
||||||
// Notification on end of export to a removable media, with hyperling to eject the external media.
|
// Notification on end of export to a removable media, with hyperling to eject the external media.
|
||||||
ExportToRemovableFinished,
|
// Obsolete by ExportFinished
|
||||||
|
// ExportToRemovableFinished,
|
||||||
|
// Notification on end of export, with hyperling to see folder and eject if export was to external media.
|
||||||
|
// Own subclass.
|
||||||
|
ExportFinished,
|
||||||
// Works on OSX only.
|
// Works on OSX only.
|
||||||
//FIXME Do we want to have it on Linux and Windows? Is it possible to get the Disconnect event on Windows?
|
//FIXME Do we want to have it on Linux and Windows? Is it possible to get the Disconnect event on Windows?
|
||||||
Mouse3dDisconnected,
|
Mouse3dDisconnected,
|
||||||
|
@ -115,15 +119,21 @@ public:
|
||||||
// Called when the side bar changes its visibility, as the "slicing complete" notification supplements
|
// Called when the side bar changes its visibility, as the "slicing complete" notification supplements
|
||||||
// the "slicing info" normally shown at the side bar.
|
// the "slicing info" normally shown at the side bar.
|
||||||
void set_slicing_complete_large(bool large);
|
void set_slicing_complete_large(bool large);
|
||||||
|
// Exporting finished, show this information with path, button to open containing folder and if ejectable - eject button
|
||||||
|
void push_exporting_finished_notification(GLCanvas3D& canvas, std::string path, std::string dir_path, bool on_removable);
|
||||||
|
// Close old notification ExportFinished.
|
||||||
|
void new_export_began(bool on_removable);
|
||||||
|
// finds ExportFinished notification and closes it if it was to removable device
|
||||||
|
void device_ejected();
|
||||||
// renders notifications in queue and deletes expired ones
|
// renders notifications in queue and deletes expired ones
|
||||||
void render_notifications(GLCanvas3D& canvas, float overlay_width);
|
void render_notifications(GLCanvas3D& canvas, float overlay_width);
|
||||||
// finds and closes all notifications of given type
|
// finds and closes all notifications of given type
|
||||||
void close_notification_of_type(const NotificationType type);
|
void close_notification_of_type(const NotificationType type);
|
||||||
// Which view is active? Plater or G-code preview? Hide warnings in G-code preview.
|
// Which view is active? Plater or G-code preview? Hide warnings in G-code preview.
|
||||||
void set_in_preview(bool preview);
|
void set_in_preview(bool preview);
|
||||||
// Move to left to avoid colision with variable layer height gizmo
|
// Move to left to avoid colision with variable layer height gizmo.
|
||||||
void set_move_from_overlay(bool move) { m_move_from_overlay = move; }
|
void set_move_from_overlay(bool move) { m_move_from_overlay = move; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// duration 0 means not disapearing
|
// duration 0 means not disapearing
|
||||||
struct NotificationData {
|
struct NotificationData {
|
||||||
|
@ -169,7 +179,7 @@ private:
|
||||||
void close() { m_close_pending = true; }
|
void close() { m_close_pending = true; }
|
||||||
// data from newer notification of same type
|
// data from newer notification of same type
|
||||||
void update(const NotificationData& n);
|
void update(const NotificationData& n);
|
||||||
bool get_finished() const { return m_finished; }
|
bool get_finished() const { return m_finished || m_close_pending; }
|
||||||
// returns top after movement
|
// returns top after movement
|
||||||
float get_top() const { return m_top_y; }
|
float get_top() const { return m_top_y; }
|
||||||
//returns top in actual frame
|
//returns top in actual frame
|
||||||
|
@ -187,25 +197,29 @@ private:
|
||||||
protected:
|
protected:
|
||||||
// Call after every size change
|
// Call after every size change
|
||||||
void init();
|
void init();
|
||||||
|
// Part of init()
|
||||||
|
virtual void count_spaces();
|
||||||
// Calculetes correct size but not se it in imgui!
|
// Calculetes correct size but not se it in imgui!
|
||||||
virtual void set_next_window_size(ImGuiWrapper& imgui);
|
virtual void set_next_window_size(ImGuiWrapper& imgui);
|
||||||
virtual void render_text(ImGuiWrapper& imgui,
|
virtual void render_text(ImGuiWrapper& imgui,
|
||||||
const float win_size_x, const float win_size_y,
|
const float win_size_x, const float win_size_y,
|
||||||
const float win_pos_x , const float win_pos_y);
|
const float win_pos_x , const float win_pos_y);
|
||||||
void render_close_button(ImGuiWrapper& imgui,
|
virtual void render_close_button(ImGuiWrapper& imgui,
|
||||||
const float win_size_x, const float win_size_y,
|
const float win_size_x, const float win_size_y,
|
||||||
const float win_pos_x , const float win_pos_y);
|
const float win_pos_x , const float win_pos_y);
|
||||||
void render_countdown(ImGuiWrapper& imgui,
|
void render_countdown(ImGuiWrapper& imgui,
|
||||||
const float win_size_x, const float win_size_y,
|
const float win_size_x, const float win_size_y,
|
||||||
const float win_pos_x , const float win_pos_y);
|
const float win_pos_x , const float win_pos_y);
|
||||||
void render_hypertext(ImGuiWrapper& imgui,
|
virtual void render_hypertext(ImGuiWrapper& imgui,
|
||||||
const float text_x, const float text_y,
|
const float text_x, const float text_y,
|
||||||
const std::string text,
|
const std::string text,
|
||||||
bool more = false);
|
bool more = false);
|
||||||
|
// Left sign could be error or warning sign
|
||||||
void render_left_sign(ImGuiWrapper& imgui);
|
void render_left_sign(ImGuiWrapper& imgui);
|
||||||
void render_minimize_button(ImGuiWrapper& imgui,
|
virtual void render_minimize_button(ImGuiWrapper& imgui,
|
||||||
const float win_pos_x, const float win_pos_y);
|
const float win_pos_x, const float win_pos_y);
|
||||||
void on_text_click();
|
// Hypertext action, returns if close notification
|
||||||
|
virtual bool on_text_click();
|
||||||
|
|
||||||
const NotificationData m_data;
|
const NotificationData m_data;
|
||||||
|
|
||||||
|
@ -236,7 +250,9 @@ private:
|
||||||
// Will go to m_finished next render
|
// Will go to m_finished next render
|
||||||
bool m_close_pending { false };
|
bool m_close_pending { false };
|
||||||
// variables to count positions correctly
|
// variables to count positions correctly
|
||||||
|
// all space without text
|
||||||
float m_window_width_offset;
|
float m_window_width_offset;
|
||||||
|
// Space on left side without text
|
||||||
float m_left_indentation;
|
float m_left_indentation;
|
||||||
// Total size of notification window - varies based on monitor
|
// Total size of notification window - varies based on monitor
|
||||||
float m_window_height { 56.0f };
|
float m_window_height { 56.0f };
|
||||||
|
@ -252,6 +268,8 @@ private:
|
||||||
bool m_is_gray { false };
|
bool m_is_gray { false };
|
||||||
//if multiline = true, notification is showing all lines(>2)
|
//if multiline = true, notification is showing all lines(>2)
|
||||||
bool m_multiline { false };
|
bool m_multiline { false };
|
||||||
|
// True if minimized button is rendered, helps to decide where is area for invisible close button
|
||||||
|
bool m_minimize_b_visible { false };
|
||||||
int m_lines_count{ 1 };
|
int m_lines_count{ 1 };
|
||||||
// Target for wxWidgets events sent by clicking on the hyperlink available at some notifications.
|
// Target for wxWidgets events sent by clicking on the hyperlink available at some notifications.
|
||||||
wxEvtHandler* m_evt_handler;
|
wxEvtHandler* m_evt_handler;
|
||||||
|
@ -270,7 +288,6 @@ private:
|
||||||
const float win_size_x, const float win_size_y,
|
const float win_size_x, const float win_size_y,
|
||||||
const float win_pos_x, const float win_pos_y)
|
const float win_pos_x, const float win_pos_y)
|
||||||
override;
|
override;
|
||||||
|
|
||||||
bool m_is_large;
|
bool m_is_large;
|
||||||
bool m_has_print_info { false };
|
bool m_has_print_info { false };
|
||||||
std::string m_print_info { std::string() };
|
std::string m_print_info { std::string() };
|
||||||
|
@ -284,6 +301,40 @@ private:
|
||||||
int warning_step;
|
int warning_step;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class ExportFinishedNotification : public PopNotification
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ExportFinishedNotification(const NotificationData& n, NotificationIDProvider& id_provider, wxEvtHandler* evt_handler, bool to_removable,const std::string& export_path,const std::string& export_dir_path)
|
||||||
|
: PopNotification(n, id_provider, evt_handler)
|
||||||
|
, m_to_removable(to_removable)
|
||||||
|
, m_export_path(export_path)
|
||||||
|
, m_export_dir_path(export_dir_path)
|
||||||
|
{
|
||||||
|
m_multiline = true;
|
||||||
|
}
|
||||||
|
bool m_to_removable;
|
||||||
|
std::string m_export_path;
|
||||||
|
std::string m_export_dir_path;
|
||||||
|
protected:
|
||||||
|
// Reserves space on right for more buttons
|
||||||
|
virtual void count_spaces() override;
|
||||||
|
virtual void render_text(ImGuiWrapper& imgui,
|
||||||
|
const float win_size_x, const float win_size_y,
|
||||||
|
const float win_pos_x, const float win_pos_y) override;
|
||||||
|
// Renders also button to open directory with exported path and eject removable media
|
||||||
|
virtual void render_close_button(ImGuiWrapper& imgui,
|
||||||
|
const float win_size_x, const float win_size_y,
|
||||||
|
const float win_pos_x, const float win_pos_y) override;
|
||||||
|
void render_eject_button(ImGuiWrapper& imgui,
|
||||||
|
const float win_size_x, const float win_size_y,
|
||||||
|
const float win_pos_x, const float win_pos_y);
|
||||||
|
virtual void render_minimize_button(ImGuiWrapper& imgui, const float win_pos_x, const float win_pos_y) override
|
||||||
|
{ m_minimize_b_visible = false; }
|
||||||
|
virtual bool on_text_click() override;
|
||||||
|
// local time of last hover for showing tooltip
|
||||||
|
long m_hover_time { 0 };
|
||||||
|
};
|
||||||
|
|
||||||
//pushes notification into the queue of notifications that are rendered
|
//pushes notification into the queue of notifications that are rendered
|
||||||
//can be used to create custom notification
|
//can be used to create custom notification
|
||||||
bool push_notification_data(const NotificationData& notification_data, GLCanvas3D& canvas, int timestamp);
|
bool push_notification_data(const NotificationData& notification_data, GLCanvas3D& canvas, int timestamp);
|
||||||
|
@ -314,7 +365,7 @@ private:
|
||||||
//prepared (basic) notifications
|
//prepared (basic) notifications
|
||||||
const std::vector<NotificationData> basic_notifications = {
|
const std::vector<NotificationData> basic_notifications = {
|
||||||
// {NotificationType::SlicingNotPossible, NotificationLevel::RegularNotification, 10, _u8L("Slicing is not possible.")},
|
// {NotificationType::SlicingNotPossible, NotificationLevel::RegularNotification, 10, _u8L("Slicing is not possible.")},
|
||||||
{NotificationType::ExportToRemovableFinished, NotificationLevel::ImportantNotification, 0, _u8L("Exporting finished."), _u8L("Eject drive.") },
|
// {NotificationType::ExportToRemovableFinished, NotificationLevel::ImportantNotification, 0, _u8L("Exporting finished."), _u8L("Eject drive.") },
|
||||||
{NotificationType::Mouse3dDisconnected, NotificationLevel::RegularNotification, 10, _u8L("3D Mouse disconnected.") },
|
{NotificationType::Mouse3dDisconnected, NotificationLevel::RegularNotification, 10, _u8L("3D Mouse disconnected.") },
|
||||||
// {NotificationType::Mouse3dConnected, NotificationLevel::RegularNotification, 5, _u8L("3D Mouse connected.") },
|
// {NotificationType::Mouse3dConnected, NotificationLevel::RegularNotification, 5, _u8L("3D Mouse connected.") },
|
||||||
// {NotificationType::NewPresetsAviable, NotificationLevel::ImportantNotification, 20, _u8L("New Presets are available."), _u8L("See here.") },
|
// {NotificationType::NewPresetsAviable, NotificationLevel::ImportantNotification, 20, _u8L("New Presets are available."), _u8L("See here.") },
|
||||||
|
|
|
@ -62,6 +62,7 @@ OG_CustomCtrl::OG_CustomCtrl( wxWindow* parent,
|
||||||
this->Bind(wxEVT_PAINT, &OG_CustomCtrl::OnPaint, this);
|
this->Bind(wxEVT_PAINT, &OG_CustomCtrl::OnPaint, this);
|
||||||
this->Bind(wxEVT_MOTION, &OG_CustomCtrl::OnMotion, this);
|
this->Bind(wxEVT_MOTION, &OG_CustomCtrl::OnMotion, this);
|
||||||
this->Bind(wxEVT_LEFT_DOWN, &OG_CustomCtrl::OnLeftDown, this);
|
this->Bind(wxEVT_LEFT_DOWN, &OG_CustomCtrl::OnLeftDown, this);
|
||||||
|
this->Bind(wxEVT_LEAVE_WINDOW, &OG_CustomCtrl::OnLeaveWin, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OG_CustomCtrl::init_ctrl_lines()
|
void OG_CustomCtrl::init_ctrl_lines()
|
||||||
|
@ -113,7 +114,15 @@ wxPoint OG_CustomCtrl::get_pos(const Line& line, Field* field_in/* = nullptr*/)
|
||||||
{
|
{
|
||||||
wxCoord v_pos = 0;
|
wxCoord v_pos = 0;
|
||||||
wxCoord h_pos = 0;
|
wxCoord h_pos = 0;
|
||||||
for (auto ctrl_line : ctrl_lines) {
|
|
||||||
|
auto correct_line_height = [](int& line_height, wxWindow* win)
|
||||||
|
{
|
||||||
|
int win_height = win->GetSize().GetHeight();
|
||||||
|
if (line_height < win_height)
|
||||||
|
line_height = win_height;
|
||||||
|
};
|
||||||
|
|
||||||
|
for (CtrlLine& ctrl_line : ctrl_lines) {
|
||||||
if (&ctrl_line.og_line == &line)
|
if (&ctrl_line.og_line == &line)
|
||||||
{
|
{
|
||||||
h_pos = m_bmp_mode_sz.GetWidth() + m_h_gap;
|
h_pos = m_bmp_mode_sz.GetWidth() + m_h_gap;
|
||||||
|
@ -133,6 +142,10 @@ wxPoint OG_CustomCtrl::get_pos(const Line& line, Field* field_in/* = nullptr*/)
|
||||||
|
|
||||||
if (line.widget) {
|
if (line.widget) {
|
||||||
h_pos += blinking_button_width;
|
h_pos += blinking_button_width;
|
||||||
|
|
||||||
|
for (auto child : line.widget_sizer->GetChildren())
|
||||||
|
if (child->IsWindow())
|
||||||
|
correct_line_height(ctrl_line.height, child->GetWindow());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,11 +156,15 @@ wxPoint OG_CustomCtrl::get_pos(const Line& line, Field* field_in/* = nullptr*/)
|
||||||
option_set.front().side_widget == nullptr && line.get_extra_widgets().size() == 0)
|
option_set.front().side_widget == nullptr && line.get_extra_widgets().size() == 0)
|
||||||
{
|
{
|
||||||
h_pos += 3 * blinking_button_width;
|
h_pos += 3 * blinking_button_width;
|
||||||
|
Field* field = opt_group->get_field(option_set.front().opt_id);
|
||||||
|
correct_line_height(ctrl_line.height, field->getWindow());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto opt : option_set) {
|
for (auto opt : option_set) {
|
||||||
Field* field = opt_group->get_field(opt.opt_id);
|
Field* field = opt_group->get_field(opt.opt_id);
|
||||||
|
correct_line_height(ctrl_line.height, field->getWindow());
|
||||||
|
|
||||||
ConfigOptionDef option = opt.opt;
|
ConfigOptionDef option = opt.opt;
|
||||||
// add label if any
|
// add label if any
|
||||||
if (!option.label.empty()) {
|
if (!option.label.empty()) {
|
||||||
|
@ -281,6 +298,16 @@ void OG_CustomCtrl::OnLeftDown(wxMouseEvent& event)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OG_CustomCtrl::OnLeaveWin(wxMouseEvent& event)
|
||||||
|
{
|
||||||
|
for (CtrlLine& line : ctrl_lines)
|
||||||
|
line.is_focused = false;
|
||||||
|
|
||||||
|
Refresh();
|
||||||
|
Update();
|
||||||
|
event.Skip();
|
||||||
|
}
|
||||||
|
|
||||||
bool OG_CustomCtrl::update_visibility(ConfigOptionMode mode)
|
bool OG_CustomCtrl::update_visibility(ConfigOptionMode mode)
|
||||||
{
|
{
|
||||||
wxCoord v_pos = 0;
|
wxCoord v_pos = 0;
|
||||||
|
|
|
@ -78,6 +78,7 @@ public:
|
||||||
void OnPaint(wxPaintEvent&);
|
void OnPaint(wxPaintEvent&);
|
||||||
void OnMotion(wxMouseEvent& event);
|
void OnMotion(wxMouseEvent& event);
|
||||||
void OnLeftDown(wxMouseEvent& event);
|
void OnLeftDown(wxMouseEvent& event);
|
||||||
|
void OnLeaveWin(wxMouseEvent& event);
|
||||||
|
|
||||||
void init_ctrl_lines();
|
void init_ctrl_lines();
|
||||||
bool update_visibility(ConfigOptionMode mode);
|
bool update_visibility(ConfigOptionMode mode);
|
||||||
|
|
|
@ -151,8 +151,8 @@ void PresetForPrinter::msw_rescale()
|
||||||
// PhysicalPrinterDialog
|
// PhysicalPrinterDialog
|
||||||
//------------------------------------------
|
//------------------------------------------
|
||||||
|
|
||||||
PhysicalPrinterDialog::PhysicalPrinterDialog(wxString printer_name) :
|
PhysicalPrinterDialog::PhysicalPrinterDialog(wxWindow* parent, wxString printer_name) :
|
||||||
DPIDialog(NULL, wxID_ANY, _L("Physical Printer"), wxDefaultPosition, wxSize(45 * wxGetApp().em_unit(), -1), wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER),
|
DPIDialog(parent, wxID_ANY, _L("Physical Printer"), wxDefaultPosition, wxSize(45 * wxGetApp().em_unit(), -1), wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER),
|
||||||
m_printer("", wxGetApp().preset_bundle->physical_printers.default_config())
|
m_printer("", wxGetApp().preset_bundle->physical_printers.default_config())
|
||||||
{
|
{
|
||||||
SetFont(wxGetApp().normal_font());
|
SetFont(wxGetApp().normal_font());
|
||||||
|
@ -169,7 +169,7 @@ PhysicalPrinterDialog::PhysicalPrinterDialog(wxString printer_name) :
|
||||||
new_printer = false;
|
new_printer = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxStaticText* label_top = new wxStaticText(this, wxID_ANY, _L("Descriptive name for the printer device") + ":");
|
wxStaticText* label_top = new wxStaticText(this, wxID_ANY, _L("Descriptive name for the printer") + ":");
|
||||||
|
|
||||||
m_add_preset_btn = new ScalableButton(this, wxID_ANY, "add_copies", "", wxDefaultSize, wxDefaultPosition, /*wxBU_LEFT | */wxBU_EXACTFIT);
|
m_add_preset_btn = new ScalableButton(this, wxID_ANY, "add_copies", "", wxDefaultSize, wxDefaultPosition, /*wxBU_LEFT | */wxBU_EXACTFIT);
|
||||||
m_add_preset_btn->SetFont(wxGetApp().normal_font());
|
m_add_preset_btn->SetFont(wxGetApp().normal_font());
|
||||||
|
@ -598,7 +598,7 @@ void PhysicalPrinterDialog::AddPreset(wxEvent& event)
|
||||||
void PhysicalPrinterDialog::DeletePreset(PresetForPrinter* preset_for_printer)
|
void PhysicalPrinterDialog::DeletePreset(PresetForPrinter* preset_for_printer)
|
||||||
{
|
{
|
||||||
if (m_presets.size() == 1) {
|
if (m_presets.size() == 1) {
|
||||||
wxString msg_text = _L("It's not possible to delete last related preset for the printer.");
|
wxString msg_text = _L("It's not possible to delete the last related preset for the printer.");
|
||||||
wxMessageDialog dialog(nullptr, msg_text, _L("Infornation"), wxICON_INFORMATION | wxOK);
|
wxMessageDialog dialog(nullptr, msg_text, _L("Infornation"), wxICON_INFORMATION | wxOK);
|
||||||
dialog.ShowModal();
|
dialog.ShowModal();
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -82,7 +82,7 @@ class PhysicalPrinterDialog : public DPIDialog
|
||||||
void AddPreset(wxEvent& event);
|
void AddPreset(wxEvent& event);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
PhysicalPrinterDialog(wxString printer_name);
|
PhysicalPrinterDialog(wxWindow* parent, wxString printer_name);
|
||||||
~PhysicalPrinterDialog();
|
~PhysicalPrinterDialog();
|
||||||
|
|
||||||
void update();
|
void update();
|
||||||
|
|
|
@ -578,7 +578,7 @@ struct Sidebar::priv
|
||||||
wxButton *btn_export_gcode;
|
wxButton *btn_export_gcode;
|
||||||
wxButton *btn_reslice;
|
wxButton *btn_reslice;
|
||||||
ScalableButton *btn_send_gcode;
|
ScalableButton *btn_send_gcode;
|
||||||
ScalableButton *btn_eject_device;
|
//ScalableButton *btn_eject_device;
|
||||||
ScalableButton* btn_export_gcode_removable; //exports to removable drives (appears only if removable drive is connected)
|
ScalableButton* btn_export_gcode_removable; //exports to removable drives (appears only if removable drive is connected)
|
||||||
|
|
||||||
bool is_collapsed {false};
|
bool is_collapsed {false};
|
||||||
|
@ -750,13 +750,14 @@ Sidebar::Sidebar(Plater *parent)
|
||||||
(*btn)->Hide();
|
(*btn)->Hide();
|
||||||
};
|
};
|
||||||
|
|
||||||
init_scalable_btn(&p->btn_send_gcode , "export_gcode", _L("Send to printer") + "\tCtrl+Shift+G");
|
init_scalable_btn(&p->btn_send_gcode , "export_gcode", _L("Send to printer ") + GUI::shortkey_ctrl_prefix() + "Shift+G");
|
||||||
init_scalable_btn(&p->btn_eject_device, "eject_sd" , _L("Remove device") + "\tCtrl+T");
|
// init_scalable_btn(&p->btn_eject_device, "eject_sd" , _L("Remove device ") + GUI::shortkey_ctrl_prefix() + "T");
|
||||||
init_scalable_btn(&p->btn_export_gcode_removable, "export_to_sd", _L("Export to SD card / Flash drive") + "\tCtrl+U");
|
init_scalable_btn(&p->btn_export_gcode_removable, "export_to_sd", _L("Export to SD card / Flash drive ") + GUI::shortkey_ctrl_prefix() + "U");
|
||||||
|
|
||||||
// regular buttons "Slice now" and "Export G-code"
|
// regular buttons "Slice now" and "Export G-code"
|
||||||
|
|
||||||
const int scaled_height = p->btn_eject_device->GetBitmapHeight() + 4;
|
// const int scaled_height = p->btn_eject_device->GetBitmapHeight() + 4;
|
||||||
|
const int scaled_height = p->btn_export_gcode_removable->GetBitmapHeight() + 4;
|
||||||
auto init_btn = [this](wxButton **btn, wxString label, const int button_height) {
|
auto init_btn = [this](wxButton **btn, wxString label, const int button_height) {
|
||||||
*btn = new wxButton(this, wxID_ANY, label, wxDefaultPosition,
|
*btn = new wxButton(this, wxID_ANY, label, wxDefaultPosition,
|
||||||
wxSize(-1, button_height), wxBU_EXACTFIT);
|
wxSize(-1, button_height), wxBU_EXACTFIT);
|
||||||
|
@ -774,7 +775,7 @@ Sidebar::Sidebar(Plater *parent)
|
||||||
complect_btns_sizer->Add(p->btn_export_gcode, 1, wxEXPAND);
|
complect_btns_sizer->Add(p->btn_export_gcode, 1, wxEXPAND);
|
||||||
complect_btns_sizer->Add(p->btn_send_gcode);
|
complect_btns_sizer->Add(p->btn_send_gcode);
|
||||||
complect_btns_sizer->Add(p->btn_export_gcode_removable);
|
complect_btns_sizer->Add(p->btn_export_gcode_removable);
|
||||||
complect_btns_sizer->Add(p->btn_eject_device);
|
// complect_btns_sizer->Add(p->btn_eject_device);
|
||||||
|
|
||||||
|
|
||||||
btns_sizer->Add(p->btn_reslice, 0, wxEXPAND | wxTOP, margin_5);
|
btns_sizer->Add(p->btn_reslice, 0, wxEXPAND | wxTOP, margin_5);
|
||||||
|
@ -797,7 +798,7 @@ Sidebar::Sidebar(Plater *parent)
|
||||||
p->plater->select_view_3D("Preview");
|
p->plater->select_view_3D("Preview");
|
||||||
});
|
});
|
||||||
p->btn_send_gcode->Bind(wxEVT_BUTTON, [this](wxCommandEvent&) { p->plater->send_gcode(); });
|
p->btn_send_gcode->Bind(wxEVT_BUTTON, [this](wxCommandEvent&) { p->plater->send_gcode(); });
|
||||||
p->btn_eject_device->Bind(wxEVT_BUTTON, [this](wxCommandEvent&) { p->plater->eject_drive(); });
|
// p->btn_eject_device->Bind(wxEVT_BUTTON, [this](wxCommandEvent&) { p->plater->eject_drive(); });
|
||||||
p->btn_export_gcode_removable->Bind(wxEVT_BUTTON, [this](wxCommandEvent&) { p->plater->export_gcode(true); });
|
p->btn_export_gcode_removable->Bind(wxEVT_BUTTON, [this](wxCommandEvent&) { p->plater->export_gcode(true); });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -940,9 +941,9 @@ void Sidebar::msw_rescale()
|
||||||
p->object_info->msw_rescale();
|
p->object_info->msw_rescale();
|
||||||
|
|
||||||
p->btn_send_gcode->msw_rescale();
|
p->btn_send_gcode->msw_rescale();
|
||||||
p->btn_eject_device->msw_rescale();
|
// p->btn_eject_device->msw_rescale();
|
||||||
p->btn_export_gcode_removable->msw_rescale();
|
p->btn_export_gcode_removable->msw_rescale();
|
||||||
const int scaled_height = p->btn_eject_device->GetBitmap().GetHeight() + 4;
|
const int scaled_height = p->btn_export_gcode_removable->GetBitmap().GetHeight() + 4;
|
||||||
p->btn_export_gcode->SetMinSize(wxSize(-1, scaled_height));
|
p->btn_export_gcode->SetMinSize(wxSize(-1, scaled_height));
|
||||||
p->btn_reslice ->SetMinSize(wxSize(-1, scaled_height));
|
p->btn_reslice ->SetMinSize(wxSize(-1, scaled_height));
|
||||||
|
|
||||||
|
@ -965,7 +966,7 @@ void Sidebar::sys_color_changed()
|
||||||
|
|
||||||
// btn...->msw_rescale() updates icon on button, so use it
|
// btn...->msw_rescale() updates icon on button, so use it
|
||||||
p->btn_send_gcode->msw_rescale();
|
p->btn_send_gcode->msw_rescale();
|
||||||
p->btn_eject_device->msw_rescale();
|
// p->btn_eject_device->msw_rescale();
|
||||||
p->btn_export_gcode_removable->msw_rescale();
|
p->btn_export_gcode_removable->msw_rescale();
|
||||||
|
|
||||||
p->scrolled->Layout();
|
p->scrolled->Layout();
|
||||||
|
@ -1268,7 +1269,7 @@ void Sidebar::enable_buttons(bool enable)
|
||||||
p->btn_reslice->Enable(enable);
|
p->btn_reslice->Enable(enable);
|
||||||
p->btn_export_gcode->Enable(enable);
|
p->btn_export_gcode->Enable(enable);
|
||||||
p->btn_send_gcode->Enable(enable);
|
p->btn_send_gcode->Enable(enable);
|
||||||
p->btn_eject_device->Enable(enable);
|
// p->btn_eject_device->Enable(enable);
|
||||||
p->btn_export_gcode_removable->Enable(enable);
|
p->btn_export_gcode_removable->Enable(enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1276,8 +1277,8 @@ bool Sidebar::show_reslice(bool show) const { return p->btn_reslice->Sh
|
||||||
bool Sidebar::show_export(bool show) const { return p->btn_export_gcode->Show(show); }
|
bool Sidebar::show_export(bool show) const { return p->btn_export_gcode->Show(show); }
|
||||||
bool Sidebar::show_send(bool show) const { return p->btn_send_gcode->Show(show); }
|
bool Sidebar::show_send(bool show) const { return p->btn_send_gcode->Show(show); }
|
||||||
bool Sidebar::show_export_removable(bool show) const { return p->btn_export_gcode_removable->Show(show); }
|
bool Sidebar::show_export_removable(bool show) const { return p->btn_export_gcode_removable->Show(show); }
|
||||||
bool Sidebar::show_eject(bool show) const { return p->btn_eject_device->Show(show); }
|
//bool Sidebar::show_eject(bool show) const { return p->btn_eject_device->Show(show); }
|
||||||
bool Sidebar::get_eject_shown() const { return p->btn_eject_device->IsShown(); }
|
//bool Sidebar::get_eject_shown() const { return p->btn_eject_device->IsShown(); }
|
||||||
|
|
||||||
bool Sidebar::is_multifilament()
|
bool Sidebar::is_multifilament()
|
||||||
{
|
{
|
||||||
|
@ -1468,6 +1469,13 @@ bool PlaterDropTarget::OnDropFiles(wxCoord x, wxCoord y, const wxArrayString &fi
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// State to manage showing after export notifications and device ejecting
|
||||||
|
enum ExportingStatus{
|
||||||
|
NOT_EXPORTING,
|
||||||
|
EXPORTING_TO_REMOVABLE,
|
||||||
|
EXPORTING_TO_LOCAL
|
||||||
|
};
|
||||||
|
|
||||||
// Plater / private
|
// Plater / private
|
||||||
struct Plater::priv
|
struct Plater::priv
|
||||||
{
|
{
|
||||||
|
@ -1770,8 +1778,9 @@ struct Plater::priv
|
||||||
// Caching last value of show_action_buttons parameter for show_action_buttons(), so that a callback which does not know this state will not override it.
|
// Caching last value of show_action_buttons parameter for show_action_buttons(), so that a callback which does not know this state will not override it.
|
||||||
mutable bool ready_to_slice = { false };
|
mutable bool ready_to_slice = { false };
|
||||||
// Flag indicating that the G-code export targets a removable device, therefore the show_action_buttons() needs to be called at any case when the background processing finishes.
|
// Flag indicating that the G-code export targets a removable device, therefore the show_action_buttons() needs to be called at any case when the background processing finishes.
|
||||||
bool writing_to_removable_device { false };
|
ExportingStatus exporting_status { NOT_EXPORTING };
|
||||||
bool show_ExportToRemovableFinished_notification { false };
|
std::string last_output_path;
|
||||||
|
std::string last_output_dir_path;
|
||||||
bool inside_snapshot_capture() { return m_prevent_snapshots != 0; }
|
bool inside_snapshot_capture() { return m_prevent_snapshots != 0; }
|
||||||
bool process_completed_with_error { false };
|
bool process_completed_with_error { false };
|
||||||
private:
|
private:
|
||||||
|
@ -1969,6 +1978,7 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
|
||||||
preview->get_wxglcanvas()->Bind(EVT_GLCANVAS_UPDATE_BED_SHAPE, [q](SimpleEvent&) { q->set_bed_shape(); });
|
preview->get_wxglcanvas()->Bind(EVT_GLCANVAS_UPDATE_BED_SHAPE, [q](SimpleEvent&) { q->set_bed_shape(); });
|
||||||
preview->get_wxglcanvas()->Bind(EVT_GLCANVAS_TAB, [this](SimpleEvent&) { select_next_view_3D(); });
|
preview->get_wxglcanvas()->Bind(EVT_GLCANVAS_TAB, [this](SimpleEvent&) { select_next_view_3D(); });
|
||||||
preview->get_wxglcanvas()->Bind(EVT_GLCANVAS_COLLAPSE_SIDEBAR, [this](SimpleEvent&) { this->q->collapse_sidebar(!this->q->is_sidebar_collapsed()); });
|
preview->get_wxglcanvas()->Bind(EVT_GLCANVAS_COLLAPSE_SIDEBAR, [this](SimpleEvent&) { this->q->collapse_sidebar(!this->q->is_sidebar_collapsed()); });
|
||||||
|
preview->get_wxglcanvas()->Bind(EVT_GLCANVAS_JUMP_TO, [this](wxKeyEvent& evt) { preview->jump_layers_slider(evt); });
|
||||||
#if ENABLE_GCODE_VIEWER
|
#if ENABLE_GCODE_VIEWER
|
||||||
preview->get_wxglcanvas()->Bind(EVT_GLCANVAS_MOVE_LAYERS_SLIDER, [this](wxKeyEvent& evt) { preview->move_layers_slider(evt); });
|
preview->get_wxglcanvas()->Bind(EVT_GLCANVAS_MOVE_LAYERS_SLIDER, [this](wxKeyEvent& evt) { preview->move_layers_slider(evt); });
|
||||||
preview->get_wxglcanvas()->Bind(EVT_GLCANVAS_EDIT_COLOR_CHANGE, [this](wxKeyEvent& evt) { preview->edit_layers_slider(evt); });
|
preview->get_wxglcanvas()->Bind(EVT_GLCANVAS_EDIT_COLOR_CHANGE, [this](wxKeyEvent& evt) { preview->edit_layers_slider(evt); });
|
||||||
|
@ -2043,9 +2053,8 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
|
||||||
});
|
});
|
||||||
this->q->Bind(EVT_REMOVABLE_DRIVES_CHANGED, [this, q](RemovableDrivesChangedEvent &) {
|
this->q->Bind(EVT_REMOVABLE_DRIVES_CHANGED, [this, q](RemovableDrivesChangedEvent &) {
|
||||||
this->show_action_buttons(this->ready_to_slice);
|
this->show_action_buttons(this->ready_to_slice);
|
||||||
if (!this->sidebar->get_eject_shown()) {
|
// Close notification ExportingFinished but only if last export was to removable
|
||||||
notification_manager->close_notification_of_type(NotificationType::ExportToRemovableFinished);
|
notification_manager->device_ejected();
|
||||||
}
|
|
||||||
});
|
});
|
||||||
// Start the background thread and register this window as a target for update events.
|
// Start the background thread and register this window as a target for update events.
|
||||||
wxGetApp().removable_drive_manager()->init(this->q);
|
wxGetApp().removable_drive_manager()->init(this->q);
|
||||||
|
@ -2314,7 +2323,7 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
|
||||||
wxMessageDialog msg_dlg(q, format_wxstr(_L(
|
wxMessageDialog msg_dlg(q, format_wxstr(_L(
|
||||||
"Some object(s) in file %s looks like saved in inches.\n"
|
"Some object(s) in file %s looks like saved in inches.\n"
|
||||||
"Should I consider them as a saved in inches and convert them?"), from_path(filename)) + "\n",
|
"Should I consider them as a saved in inches and convert them?"), from_path(filename)) + "\n",
|
||||||
_L("Saved in inches object detected"), wxICON_WARNING | wxYES | wxNO);
|
_L("The object appears to be saved in inches"), wxICON_WARNING | wxYES | wxNO);
|
||||||
if (msg_dlg.ShowModal() == wxID_YES)
|
if (msg_dlg.ShowModal() == wxID_YES)
|
||||||
convert_from_imperial_units(model);
|
convert_from_imperial_units(model);
|
||||||
}
|
}
|
||||||
|
@ -2912,6 +2921,7 @@ unsigned int Plater::priv::update_background_process(bool force_validation, bool
|
||||||
const wxString invalid_str = _L("Invalid data");
|
const wxString invalid_str = _L("Invalid data");
|
||||||
for (auto btn : {ActionButtonType::abReslice, ActionButtonType::abSendGCode, ActionButtonType::abExport})
|
for (auto btn : {ActionButtonType::abReslice, ActionButtonType::abSendGCode, ActionButtonType::abExport})
|
||||||
sidebar->set_btn_label(btn, invalid_str);
|
sidebar->set_btn_label(btn, invalid_str);
|
||||||
|
process_completed_with_error = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -3511,9 +3521,7 @@ void Plater::priv::on_slicing_completed(wxCommandEvent & evt)
|
||||||
void Plater::priv::on_export_began(wxCommandEvent& evt)
|
void Plater::priv::on_export_began(wxCommandEvent& evt)
|
||||||
{
|
{
|
||||||
if (show_warning_dialog)
|
if (show_warning_dialog)
|
||||||
warnings_dialog();
|
warnings_dialog();
|
||||||
if (this->writing_to_removable_device)
|
|
||||||
this->show_ExportToRemovableFinished_notification = true;
|
|
||||||
}
|
}
|
||||||
void Plater::priv::on_slicing_began()
|
void Plater::priv::on_slicing_began()
|
||||||
{
|
{
|
||||||
|
@ -3591,10 +3599,14 @@ void Plater::priv::on_process_completed(SlicingProcessCompletedEvent &evt)
|
||||||
} else
|
} else
|
||||||
notification_manager->push_slicing_error_notification(message, *q->get_current_canvas3D());
|
notification_manager->push_slicing_error_notification(message, *q->get_current_canvas3D());
|
||||||
this->statusbar()->set_status_text(from_u8(message));
|
this->statusbar()->set_status_text(from_u8(message));
|
||||||
const wxString invalid_str = _L("Invalid data");
|
if (evt.invalidate_plater())
|
||||||
for (auto btn : { ActionButtonType::abReslice, ActionButtonType::abSendGCode, ActionButtonType::abExport })
|
{
|
||||||
sidebar->set_btn_label(btn, invalid_str);
|
const wxString invalid_str = _L("Invalid data");
|
||||||
process_completed_with_error = true;
|
for (auto btn : { ActionButtonType::abReslice, ActionButtonType::abSendGCode, ActionButtonType::abExport })
|
||||||
|
sidebar->set_btn_label(btn, invalid_str);
|
||||||
|
process_completed_with_error = true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (evt.cancelled())
|
if (evt.cancelled())
|
||||||
this->statusbar()->set_status_text(_L("Cancelled"));
|
this->statusbar()->set_status_text(_L("Cancelled"));
|
||||||
|
@ -3629,13 +3641,14 @@ void Plater::priv::on_process_completed(SlicingProcessCompletedEvent &evt)
|
||||||
show_action_buttons(false);
|
show_action_buttons(false);
|
||||||
}
|
}
|
||||||
// If writing to removable drive was scheduled, show notification with eject button
|
// If writing to removable drive was scheduled, show notification with eject button
|
||||||
if (this->writing_to_removable_device && this->show_ExportToRemovableFinished_notification) {
|
if (exporting_status == ExportingStatus::EXPORTING_TO_REMOVABLE && !this->process_completed_with_error) {
|
||||||
show_action_buttons(false);
|
show_action_buttons(false);
|
||||||
notification_manager->push_notification(NotificationType::ExportToRemovableFinished, *q->get_current_canvas3D());
|
notification_manager->push_exporting_finished_notification(*q->get_current_canvas3D(), last_output_path, last_output_dir_path, true);
|
||||||
}
|
wxGetApp().removable_drive_manager()->set_exporting_finished(true);
|
||||||
|
}else if (exporting_status == ExportingStatus::EXPORTING_TO_LOCAL && !this->process_completed_with_error)
|
||||||
|
notification_manager->push_exporting_finished_notification(*q->get_current_canvas3D(), last_output_path, last_output_dir_path, false);
|
||||||
}
|
}
|
||||||
this->show_ExportToRemovableFinished_notification = false;
|
exporting_status = ExportingStatus::NOT_EXPORTING;
|
||||||
this->writing_to_removable_device = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Plater::priv::on_layer_editing_toggled(bool enable)
|
void Plater::priv::on_layer_editing_toggled(bool enable)
|
||||||
|
@ -4306,8 +4319,8 @@ void Plater::priv::show_action_buttons(const bool ready_to_slice) const
|
||||||
if (sidebar->show_reslice(false) |
|
if (sidebar->show_reslice(false) |
|
||||||
sidebar->show_export(true) |
|
sidebar->show_export(true) |
|
||||||
sidebar->show_send(send_gcode_shown) |
|
sidebar->show_send(send_gcode_shown) |
|
||||||
sidebar->show_export_removable(removable_media_status.has_removable_drives) |
|
sidebar->show_export_removable(removable_media_status.has_removable_drives))
|
||||||
sidebar->show_eject(removable_media_status.has_eject))
|
// sidebar->show_eject(removable_media_status.has_eject))
|
||||||
sidebar->Layout();
|
sidebar->Layout();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -4318,8 +4331,8 @@ void Plater::priv::show_action_buttons(const bool ready_to_slice) const
|
||||||
if (sidebar->show_reslice(ready_to_slice) |
|
if (sidebar->show_reslice(ready_to_slice) |
|
||||||
sidebar->show_export(!ready_to_slice) |
|
sidebar->show_export(!ready_to_slice) |
|
||||||
sidebar->show_send(send_gcode_shown && !ready_to_slice) |
|
sidebar->show_send(send_gcode_shown && !ready_to_slice) |
|
||||||
sidebar->show_export_removable(!ready_to_slice && removable_media_status.has_removable_drives) |
|
sidebar->show_export_removable(!ready_to_slice && removable_media_status.has_removable_drives))
|
||||||
sidebar->show_eject(!ready_to_slice && removable_media_status.has_eject))
|
// sidebar->show_eject(!ready_to_slice && removable_media_status.has_eject))
|
||||||
sidebar->Layout();
|
sidebar->Layout();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4727,7 +4740,7 @@ void Plater::load_gcode(const wxString& filename)
|
||||||
GCodeProcessor processor;
|
GCodeProcessor processor;
|
||||||
processor.enable_producers(true);
|
processor.enable_producers(true);
|
||||||
processor.enable_machine_envelope_processing(true);
|
processor.enable_machine_envelope_processing(true);
|
||||||
processor.process_file(filename.ToUTF8().data());
|
processor.process_file(filename.ToUTF8().data(), false);
|
||||||
p->gcode_result = std::move(processor.extract_result());
|
p->gcode_result = std::move(processor.extract_result());
|
||||||
|
|
||||||
// show results
|
// show results
|
||||||
|
@ -4958,7 +4971,7 @@ void Plater::export_gcode(bool prefer_removable)
|
||||||
if (p->model.objects.empty())
|
if (p->model.objects.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (p->process_completed_with_error)//here
|
if (p->process_completed_with_error)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// If possible, remove accents from accented latin characters.
|
// If possible, remove accents from accented latin characters.
|
||||||
|
@ -5003,7 +5016,10 @@ void Plater::export_gcode(bool prefer_removable)
|
||||||
|
|
||||||
if (! output_path.empty()) {
|
if (! output_path.empty()) {
|
||||||
bool path_on_removable_media = removable_drive_manager.set_and_verify_last_save_path(output_path.string());
|
bool path_on_removable_media = removable_drive_manager.set_and_verify_last_save_path(output_path.string());
|
||||||
p->writing_to_removable_device = path_on_removable_media;
|
p->notification_manager->new_export_began(path_on_removable_media);
|
||||||
|
p->exporting_status = path_on_removable_media ? ExportingStatus::EXPORTING_TO_REMOVABLE : ExportingStatus::EXPORTING_TO_LOCAL;
|
||||||
|
p->last_output_path = output_path.string();
|
||||||
|
p->last_output_dir_path = output_path.parent_path().string();
|
||||||
p->export_gcode(output_path, path_on_removable_media, PrintHostJob());
|
p->export_gcode(output_path, path_on_removable_media, PrintHostJob());
|
||||||
// Storing a path to AppConfig either as path to removable media or a path to internal media.
|
// Storing a path to AppConfig either as path to removable media or a path to internal media.
|
||||||
// is_path_on_removable_drive() is called with the "true" parameter to update its internal database as the user may have shuffled the external drives
|
// is_path_on_removable_drive() is called with the "true" parameter to update its internal database as the user may have shuffled the external drives
|
||||||
|
@ -5223,6 +5239,10 @@ void Plater::export_toolpaths_to_obj() const
|
||||||
|
|
||||||
void Plater::reslice()
|
void Plater::reslice()
|
||||||
{
|
{
|
||||||
|
// There is "invalid data" button instead "slice now"
|
||||||
|
if (p->process_completed_with_error)
|
||||||
|
return;
|
||||||
|
|
||||||
// Stop arrange and (or) optimize rotation tasks.
|
// Stop arrange and (or) optimize rotation tasks.
|
||||||
this->stop_jobs();
|
this->stop_jobs();
|
||||||
|
|
||||||
|
|
|
@ -117,12 +117,12 @@ void PreferencesDialog::build()
|
||||||
option = Option(def, "show_incompatible_presets");
|
option = Option(def, "show_incompatible_presets");
|
||||||
m_optgroup_general->append_single_option_line(option);
|
m_optgroup_general->append_single_option_line(option);
|
||||||
|
|
||||||
def.label = L("Single Instance");
|
def.label = L("Single instance mode");
|
||||||
def.type = coBool;
|
def.type = coBool;
|
||||||
#if __APPLE__
|
#if __APPLE__
|
||||||
def.tooltip = L("On OSX there is always only one instance of app running by default. However it is allowed to run multiple instances of same app from the command line. In such case this settings will allow only one instance.");
|
def.tooltip = L("On OSX there is always only one instance of app running by default. However it is allowed to run multiple instances of same app from the command line. In such case this settings will allow only one instance.");
|
||||||
#else
|
#else
|
||||||
def.tooltip = L("If this is enabled, when staring PrusaSlicer and another instance of same PrusaSlicer is running, that instance will be reactivated instead.");
|
def.tooltip = L("If this is enabled, when starting PrusaSlicer and another instance of same PrusaSlicer is running, that instance will be reactivated instead.");
|
||||||
#endif
|
#endif
|
||||||
def.set_default_value(new ConfigOptionBool{ app_config->has("single_instance") ? app_config->get("single_instance") == "1" : false });
|
def.set_default_value(new ConfigOptionBool{ app_config->has("single_instance") ? app_config->get("single_instance") == "1" : false });
|
||||||
option = Option(def, "single_instance");
|
option = Option(def, "single_instance");
|
||||||
|
@ -153,7 +153,7 @@ void PreferencesDialog::build()
|
||||||
|
|
||||||
def.label = L("Ask for unsaved changes when closing application");
|
def.label = L("Ask for unsaved changes when closing application");
|
||||||
def.type = coBool;
|
def.type = coBool;
|
||||||
def.tooltip = L("Always ask for unsaved changes when closing application");
|
def.tooltip = L("When closing the application, always ask for unsaved changes");
|
||||||
def.set_default_value(new ConfigOptionBool{ app_config->get("default_action_on_close_application") == "none" });
|
def.set_default_value(new ConfigOptionBool{ app_config->get("default_action_on_close_application") == "none" });
|
||||||
option = Option(def, "default_action_on_close_application");
|
option = Option(def, "default_action_on_close_application");
|
||||||
m_optgroup_general->append_single_option_line(option);
|
m_optgroup_general->append_single_option_line(option);
|
||||||
|
@ -235,8 +235,8 @@ void PreferencesDialog::build()
|
||||||
|
|
||||||
def.label = L("Sequential slider applied only to top layer");
|
def.label = L("Sequential slider applied only to top layer");
|
||||||
def.type = coBool;
|
def.type = coBool;
|
||||||
def.tooltip = L("If enabled, changes made using the sequential slider, in preview, apply only to gcode top layer, "
|
def.tooltip = L("If enabled, changes made using the sequential slider, in preview, apply only to gcode top layer. "
|
||||||
"if disabled, changes made using the sequential slider, in preview, apply to the whole gcode.");
|
"If disabled, changes made using the sequential slider, in preview, apply to the whole gcode.");
|
||||||
def.set_default_value(new ConfigOptionBool{ app_config->get("seq_top_layer_only") == "1" });
|
def.set_default_value(new ConfigOptionBool{ app_config->get("seq_top_layer_only") == "1" });
|
||||||
option = Option(def, "seq_top_layer_only");
|
option = Option(def, "seq_top_layer_only");
|
||||||
m_optgroup_gui->append_single_option_line(option);
|
m_optgroup_gui->append_single_option_line(option);
|
||||||
|
@ -427,8 +427,8 @@ void PreferencesDialog::create_icon_size_slider()
|
||||||
void PreferencesDialog::create_settings_mode_widget()
|
void PreferencesDialog::create_settings_mode_widget()
|
||||||
{
|
{
|
||||||
wxString choices[] = { _L("Old regular layout with the tab bar"),
|
wxString choices[] = { _L("Old regular layout with the tab bar"),
|
||||||
_L("New layout without the tab bar on the plater"),
|
_L("New layout, access via settings button in the top menu"),
|
||||||
_L("Settings will be shown in the non-modal dialog") };
|
_L("Settings in non-modal window") };
|
||||||
|
|
||||||
auto app_config = get_app_config();
|
auto app_config = get_app_config();
|
||||||
int selection = app_config->get("old_settings_layout_mode") == "1" ? 0 :
|
int selection = app_config->get("old_settings_layout_mode") == "1" ? 0 :
|
||||||
|
@ -437,7 +437,7 @@ void PreferencesDialog::create_settings_mode_widget()
|
||||||
|
|
||||||
wxWindow* parent = m_optgroup_gui->ctrl_parent();
|
wxWindow* parent = m_optgroup_gui->ctrl_parent();
|
||||||
|
|
||||||
m_layout_mode_box = new wxRadioBox(parent, wxID_ANY, _L("Settings layout mode"), wxDefaultPosition, wxDefaultSize, WXSIZEOF(choices), choices,
|
m_layout_mode_box = new wxRadioBox(parent, wxID_ANY, _L("Layout Options"), wxDefaultPosition, wxDefaultSize, WXSIZEOF(choices), choices,
|
||||||
3, wxRA_SPECIFY_ROWS);
|
3, wxRA_SPECIFY_ROWS);
|
||||||
m_layout_mode_box->SetFont(wxGetApp().normal_font());
|
m_layout_mode_box->SetFont(wxGetApp().normal_font());
|
||||||
m_layout_mode_box->SetSelection(selection);
|
m_layout_mode_box->SetSelection(selection);
|
||||||
|
|
|
@ -253,14 +253,14 @@ void PresetComboBox::edit_physical_printer()
|
||||||
if (!m_preset_bundle->physical_printers.has_selection())
|
if (!m_preset_bundle->physical_printers.has_selection())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
PhysicalPrinterDialog dlg(this->GetString(this->GetSelection()));
|
PhysicalPrinterDialog dlg(this->GetParent(),this->GetString(this->GetSelection()));
|
||||||
if (dlg.ShowModal() == wxID_OK)
|
if (dlg.ShowModal() == wxID_OK)
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PresetComboBox::add_physical_printer()
|
void PresetComboBox::add_physical_printer()
|
||||||
{
|
{
|
||||||
if (PhysicalPrinterDialog(wxEmptyString).ShowModal() == wxID_OK)
|
if (PhysicalPrinterDialog(this->GetParent(), wxEmptyString).ShowModal() == wxID_OK)
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -675,7 +675,7 @@ void PlaterPresetComboBox::show_add_menu()
|
||||||
|
|
||||||
append_menu_item(menu, wxID_ANY, _L("Add physical printer"), "",
|
append_menu_item(menu, wxID_ANY, _L("Add physical printer"), "",
|
||||||
[this](wxCommandEvent&) {
|
[this](wxCommandEvent&) {
|
||||||
PhysicalPrinterDialog dlg(wxEmptyString);
|
PhysicalPrinterDialog dlg(this->GetParent(), wxEmptyString);
|
||||||
if (dlg.ShowModal() == wxID_OK)
|
if (dlg.ShowModal() == wxID_OK)
|
||||||
update();
|
update();
|
||||||
}, "edit_uni", menu, []() { return true; }, wxGetApp().plater());
|
}, "edit_uni", menu, []() { return true; }, wxGetApp().plater());
|
||||||
|
|
|
@ -391,7 +391,6 @@ bool RemovableDriveManager::set_and_verify_last_save_path(const std::string &pat
|
||||||
#ifndef REMOVABLE_DRIVE_MANAGER_OS_CALLBACKS
|
#ifndef REMOVABLE_DRIVE_MANAGER_OS_CALLBACKS
|
||||||
this->update();
|
this->update();
|
||||||
#endif // REMOVABLE_DRIVE_MANAGER_OS_CALLBACKS
|
#endif // REMOVABLE_DRIVE_MANAGER_OS_CALLBACKS
|
||||||
|
|
||||||
m_last_save_path = this->get_removable_drive_from_path(path);
|
m_last_save_path = this->get_removable_drive_from_path(path);
|
||||||
m_exporting_finished = false;
|
m_exporting_finished = false;
|
||||||
return ! m_last_save_path.empty();
|
return ! m_last_save_path.empty();
|
||||||
|
|
|
@ -130,15 +130,16 @@ void SavePresetDialog::Item::update()
|
||||||
|
|
||||||
if (m_valid_type == Valid && existing && m_preset_name != m_presets->get_selected_preset_name())
|
if (m_valid_type == Valid && existing && m_preset_name != m_presets->get_selected_preset_name())
|
||||||
{
|
{
|
||||||
info_line = from_u8((boost::format(_u8L("Preset with name \"%1%\" already exists.")) % m_preset_name).str());
|
if (existing->is_compatible)
|
||||||
if (!existing->is_compatible)
|
info_line = from_u8((boost::format(_u8L("Preset with name \"%1%\" already exists.")) % m_preset_name).str());
|
||||||
info_line += "\n" + _L("And selected preset is imcopatible with selected printer.");
|
else
|
||||||
|
info_line = from_u8((boost::format(_u8L("Preset with name \"%1%\" already exists and is imcopatible with selected printer.")) % m_preset_name).str());
|
||||||
info_line += "\n" + _L("Note: This preset will be replaced after saving");
|
info_line += "\n" + _L("Note: This preset will be replaced after saving");
|
||||||
m_valid_type = Warning;
|
m_valid_type = Warning;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_valid_type == Valid && m_preset_name.empty()) {
|
if (m_valid_type == Valid && m_preset_name.empty()) {
|
||||||
info_line = _L("The empty name is not available.");
|
info_line = _L("The name cannot be empty.");
|
||||||
m_valid_type = NoValid;
|
m_valid_type = NoValid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -171,14 +172,14 @@ void SavePresetDialog::Item::accept()
|
||||||
// SavePresetDialog
|
// SavePresetDialog
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
|
|
||||||
SavePresetDialog::SavePresetDialog(Preset::Type type, std::string suffix)
|
SavePresetDialog::SavePresetDialog(wxWindow* parent, Preset::Type type, std::string suffix)
|
||||||
: DPIDialog(nullptr, wxID_ANY, _L("Save preset"), wxDefaultPosition, wxSize(45 * wxGetApp().em_unit(), 5 * wxGetApp().em_unit()), wxDEFAULT_DIALOG_STYLE | wxICON_WARNING | wxRESIZE_BORDER)
|
: DPIDialog(parent, wxID_ANY, _L("Save preset"), wxDefaultPosition, wxSize(45 * wxGetApp().em_unit(), 5 * wxGetApp().em_unit()), wxDEFAULT_DIALOG_STYLE | wxICON_WARNING | wxRESIZE_BORDER)
|
||||||
{
|
{
|
||||||
build(std::vector<Preset::Type>{type}, suffix);
|
build(std::vector<Preset::Type>{type}, suffix);
|
||||||
}
|
}
|
||||||
|
|
||||||
SavePresetDialog::SavePresetDialog(std::vector<Preset::Type> types, std::string suffix)
|
SavePresetDialog::SavePresetDialog(wxWindow* parent, std::vector<Preset::Type> types, std::string suffix)
|
||||||
: DPIDialog(nullptr, wxID_ANY, _L("Save preset"), wxDefaultPosition, wxSize(45 * wxGetApp().em_unit(), 5 * wxGetApp().em_unit()), wxDEFAULT_DIALOG_STYLE | wxICON_WARNING | wxRESIZE_BORDER)
|
: DPIDialog(parent, wxID_ANY, _L("Save preset"), wxDefaultPosition, wxSize(45 * wxGetApp().em_unit(), 5 * wxGetApp().em_unit()), wxDEFAULT_DIALOG_STYLE | wxICON_WARNING | wxRESIZE_BORDER)
|
||||||
{
|
{
|
||||||
build(types, suffix);
|
build(types, suffix);
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,8 +73,8 @@ class SavePresetDialog : public DPIDialog
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
SavePresetDialog(Preset::Type type, std::string suffix = "");
|
SavePresetDialog(wxWindow* parent, Preset::Type type, std::string suffix = "");
|
||||||
SavePresetDialog(std::vector<Preset::Type> types, std::string suffix = "");
|
SavePresetDialog(wxWindow* parent, std::vector<Preset::Type> types, std::string suffix = "");
|
||||||
~SavePresetDialog();
|
~SavePresetDialog();
|
||||||
|
|
||||||
void AddItem(Preset::Type type, const std::string& suffix);
|
void AddItem(Preset::Type type, const std::string& suffix);
|
||||||
|
|
|
@ -430,7 +430,7 @@ SearchDialog::SearchDialog(OptionsSearcher* searcher)
|
||||||
wxColour bgr_clr = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW);
|
wxColour bgr_clr = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW);
|
||||||
SetBackgroundColour(bgr_clr);
|
SetBackgroundColour(bgr_clr);
|
||||||
|
|
||||||
default_string = _L("Type here to search");
|
default_string = _L("Enter a search term");
|
||||||
int border = 10;
|
int border = 10;
|
||||||
int em = em_unit();
|
int em = em_unit();
|
||||||
|
|
||||||
|
|
|
@ -87,9 +87,9 @@ std::string get_mem_info(bool format_as_html)
|
||||||
|
|
||||||
SysInfoDialog::SysInfoDialog()
|
SysInfoDialog::SysInfoDialog()
|
||||||
#if ENABLE_GCODE_VIEWER
|
#if ENABLE_GCODE_VIEWER
|
||||||
: DPIDialog(NULL, wxID_ANY, (wxGetApp().is_editor() ? wxString(SLIC3R_APP_NAME) : wxString(GCODEVIEWER_APP_NAME)) + " - " + _L("System Information"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
|
: DPIDialog((wxWindow*)wxGetApp().mainframe, wxID_ANY, (wxGetApp().is_editor() ? wxString(SLIC3R_APP_NAME) : wxString(GCODEVIEWER_APP_NAME)) + " - " + _L("System Information"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
|
||||||
#else
|
#else
|
||||||
: DPIDialog(NULL, wxID_ANY, wxString(SLIC3R_APP_NAME) + " - " + _L("System Information"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
|
: DPIDialog((wxWindow*)wxGetApp().mainframe, wxID_ANY, wxString(SLIC3R_APP_NAME) + " - " + _L("System Information"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
|
||||||
#endif // ENABLE_GCODE_VIEWER
|
#endif // ENABLE_GCODE_VIEWER
|
||||||
{
|
{
|
||||||
wxColour bgr_clr = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW);
|
wxColour bgr_clr = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW);
|
||||||
|
|
|
@ -219,7 +219,7 @@ void Tab::create_preset_tab()
|
||||||
"or click this button.")));
|
"or click this button.")));
|
||||||
|
|
||||||
add_scaled_button(panel, &m_search_btn, "search");
|
add_scaled_button(panel, &m_search_btn, "search");
|
||||||
m_search_btn->SetToolTip(format_wxstr(_L("Click to start a search or use %1% shortcut"), "Ctrl+F"));
|
m_search_btn->SetToolTip(format_wxstr(_L("Search in settings [%1%]"), "Ctrl+F"));
|
||||||
|
|
||||||
// Bitmaps to be shown on the "Revert to system" aka "Lock to system" button next to each input field.
|
// Bitmaps to be shown on the "Revert to system" aka "Lock to system" button next to each input field.
|
||||||
add_scaled_bitmap(this, m_bmp_value_lock , "lock_closed");
|
add_scaled_bitmap(this, m_bmp_value_lock , "lock_closed");
|
||||||
|
@ -2039,7 +2039,7 @@ void TabPrinter::build_print_host_upload_group(Page* page)
|
||||||
wxString description_line_text = _L(""
|
wxString description_line_text = _L(""
|
||||||
"Note: All parameters from this group are moved to the Physical Printer settings (see changelog).\n\n"
|
"Note: All parameters from this group are moved to the Physical Printer settings (see changelog).\n\n"
|
||||||
"A new Physical Printer profile is created by clicking on the \"cog\" icon right of the Printer profiles combo box, "
|
"A new Physical Printer profile is created by clicking on the \"cog\" icon right of the Printer profiles combo box, "
|
||||||
"by selecting the \"add or remove printers\" item in the Printer combo box. The Physical Printer profile editor opens "
|
"by selecting the \"Add physical printer\" item in the Printer combo box. The Physical Printer profile editor opens "
|
||||||
"also when clicking on the \"cog\" icon in the Printer settings tab. The Physical Printer profiles are being stored "
|
"also when clicking on the \"cog\" icon in the Printer settings tab. The Physical Printer profiles are being stored "
|
||||||
"into PrusaSlicer/physical_printer directory.");
|
"into PrusaSlicer/physical_printer directory.");
|
||||||
|
|
||||||
|
@ -3338,7 +3338,7 @@ void Tab::save_preset(std::string name /*= ""*/, bool detach)
|
||||||
//! m_treectrl->OnSetFocus();
|
//! m_treectrl->OnSetFocus();
|
||||||
|
|
||||||
if (name.empty()) {
|
if (name.empty()) {
|
||||||
SavePresetDialog dlg(m_type, detach ? _u8L("Detached") : "");
|
SavePresetDialog dlg(m_parent, m_type, detach ? _u8L("Detached") : "");
|
||||||
if (dlg.ShowModal() != wxID_OK)
|
if (dlg.ShowModal() != wxID_OK)
|
||||||
return;
|
return;
|
||||||
name = dlg.get_name();
|
name = dlg.get_name();
|
||||||
|
@ -3427,7 +3427,7 @@ void Tab::delete_preset()
|
||||||
std::vector<std::string> ph_printers_only = physical_printers.get_printers_with_only_preset(current_preset.name);
|
std::vector<std::string> ph_printers_only = physical_printers.get_printers_with_only_preset(current_preset.name);
|
||||||
|
|
||||||
if (!ph_printers.empty()) {
|
if (!ph_printers.empty()) {
|
||||||
msg += _L("Next physical printer(s) has/have selected preset") + ":";
|
msg += _L("The physical printer(s) below is based on the preset, you are going to delete.");
|
||||||
for (const std::string& printer : ph_printers)
|
for (const std::string& printer : ph_printers)
|
||||||
msg += "\n \"" + from_u8(printer) + "\",";
|
msg += "\n \"" + from_u8(printer) + "\",";
|
||||||
msg.RemoveLast();
|
msg.RemoveLast();
|
||||||
|
@ -3435,7 +3435,7 @@ void Tab::delete_preset()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ph_printers_only.empty()) {
|
if (!ph_printers_only.empty()) {
|
||||||
msg += _L("Next physical printer(s) has/have one and only selected preset") + ":";
|
msg += _L("The physical printer(s) below is based only on the preset, you are going to delete.");
|
||||||
for (const std::string& printer : ph_printers_only)
|
for (const std::string& printer : ph_printers_only)
|
||||||
msg += "\n \"" + from_u8(printer) + "\",";
|
msg += "\n \"" + from_u8(printer) + "\",";
|
||||||
msg.RemoveLast();
|
msg.RemoveLast();
|
||||||
|
|
|
@ -522,7 +522,7 @@ void UnsavedChangesModel::Rescale()
|
||||||
//------------------------------------------
|
//------------------------------------------
|
||||||
|
|
||||||
UnsavedChangesDialog::UnsavedChangesDialog(const wxString& header)
|
UnsavedChangesDialog::UnsavedChangesDialog(const wxString& header)
|
||||||
: DPIDialog(nullptr, wxID_ANY, _L("Closing PrusaSlicer: Unsaved Changes"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
|
: DPIDialog((wxWindow*)wxGetApp().mainframe , wxID_ANY, _L("PrusaSlicer is closing: Unsaved Changes"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
|
||||||
{
|
{
|
||||||
m_app_config_key = "default_action_on_close_application";
|
m_app_config_key = "default_action_on_close_application";
|
||||||
|
|
||||||
|
@ -539,7 +539,7 @@ UnsavedChangesDialog::UnsavedChangesDialog(const wxString& header)
|
||||||
}
|
}
|
||||||
|
|
||||||
UnsavedChangesDialog::UnsavedChangesDialog(Preset::Type type, PresetCollection* dependent_presets, const std::string& new_selected_preset)
|
UnsavedChangesDialog::UnsavedChangesDialog(Preset::Type type, PresetCollection* dependent_presets, const std::string& new_selected_preset)
|
||||||
: DPIDialog(nullptr, wxID_ANY, _L("Switching Presets: Unsaved Changes"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
|
: DPIDialog((wxWindow*)wxGetApp().mainframe, wxID_ANY, _L("Switching Presets: Unsaved Changes"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
|
||||||
{
|
{
|
||||||
m_app_config_key = "default_action_on_select_preset";
|
m_app_config_key = "default_action_on_select_preset";
|
||||||
|
|
||||||
|
@ -737,7 +737,7 @@ void UnsavedChangesDialog::show_info_line(Action action, std::string preset_name
|
||||||
text = _L("All modified options will be reverted.");
|
text = _L("All modified options will be reverted.");
|
||||||
else {
|
else {
|
||||||
if (preset_name.empty())
|
if (preset_name.empty())
|
||||||
text = action == Action::Save ? _L("Save the selected options.") : _L("Transfer the selected options to the newly selected presets.");
|
text = action == Action::Save ? _L("Save the selected options.") : _L("Transfer the selected settings to the newly selected preset.");
|
||||||
else
|
else
|
||||||
text = format_wxstr(
|
text = format_wxstr(
|
||||||
action == Action::Save ?
|
action == Action::Save ?
|
||||||
|
@ -781,7 +781,7 @@ bool UnsavedChangesDialog::save(PresetCollection* dependent_presets)
|
||||||
|
|
||||||
// for system/default/external presets we should take an edited name
|
// for system/default/external presets we should take an edited name
|
||||||
if (preset.is_system || preset.is_default || preset.is_external) {
|
if (preset.is_system || preset.is_default || preset.is_external) {
|
||||||
SavePresetDialog save_dlg(preset.type);
|
SavePresetDialog save_dlg(this, preset.type);
|
||||||
if (save_dlg.ShowModal() != wxID_OK) {
|
if (save_dlg.ShowModal() != wxID_OK) {
|
||||||
m_exit_action = Action::Discard;
|
m_exit_action = Action::Discard;
|
||||||
return false;
|
return false;
|
||||||
|
@ -809,7 +809,7 @@ bool UnsavedChangesDialog::save(PresetCollection* dependent_presets)
|
||||||
|
|
||||||
|
|
||||||
if (!types_for_save.empty()) {
|
if (!types_for_save.empty()) {
|
||||||
SavePresetDialog save_dlg(types_for_save);
|
SavePresetDialog save_dlg(this, types_for_save);
|
||||||
if (save_dlg.ShowModal() != wxID_OK) {
|
if (save_dlg.ShowModal() != wxID_OK) {
|
||||||
m_exit_action = Action::Discard;
|
m_exit_action = Action::Discard;
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -203,7 +203,7 @@ bool Repetier::get_groups(wxArrayString& groups) const
|
||||||
groups.push_back(_utf8(L("Default")));
|
groups.push_back(_utf8(L("Default")));
|
||||||
} else {
|
} else {
|
||||||
// Is it safe to assume that the data are utf-8 encoded?
|
// Is it safe to assume that the data are utf-8 encoded?
|
||||||
groups.push_back(wxString::FromUTF8(v.second.data()));
|
groups.push_back(GUI::from_u8(v.second.data()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
set(SLIC3R_APP_NAME "PrusaSlicer")
|
set(SLIC3R_APP_NAME "PrusaSlicer")
|
||||||
set(SLIC3R_APP_KEY "PrusaSlicer")
|
set(SLIC3R_APP_KEY "PrusaSlicer")
|
||||||
set(SLIC3R_VERSION "2.3.0-alpha2")
|
set(SLIC3R_VERSION "2.3.0-alpha3")
|
||||||
set(SLIC3R_BUILD_ID "PrusaSlicer-${SLIC3R_VERSION}+UNKNOWN")
|
set(SLIC3R_BUILD_ID "PrusaSlicer-${SLIC3R_VERSION}+UNKNOWN")
|
||||||
set(SLIC3R_RC_VERSION "2,3,0,0")
|
set(SLIC3R_RC_VERSION "2,3,0,0")
|
||||||
set(SLIC3R_RC_VERSION_DOTS "2.3.0.0")
|
set(SLIC3R_RC_VERSION_DOTS "2.3.0.0")
|
||||||
|
|
Loading…
Reference in a new issue