Commit Graph

220 Commits

Author SHA1 Message Date
f968cfd2d5 Fixing Clang warnings 3 2021-02-08 17:52:29 +01:00
301ac20fa1 Fixing Clang warnings 2 2021-02-08 17:52:29 +01:00
22ef17af54 Fixing Clang warnings 1 2021-02-08 17:52:29 +01:00
6bdbe0ffb4 Replaced __linux macro with __linux__ 2021-01-11 13:31:30 +01:00
2c50767009 On OSX, we use boost::process::spawn() to launch new instances of PrusaSlicer from another PrusaSlicer.
boost::process::spawn() sets SIGCHLD to SIGIGN for the child process, thus if a child PrusaSlicer spawns another
subprocess and the subrocess dies, the child PrusaSlicer will not receive information on end of subprocess
(posix waitpid() call will always fail).
https://jmmv.dev/2008/10/boostprocess-and-sigchld.html
The child instance of PrusaSlicer has to reset SIGCHLD to its default, so that posix waitpid() and similar continue to work.
Fixes #5507
2021-01-07 19:14:48 +01:00
b31f22e401 boost::process::spawn() sets SIGINT to SIGIGN, which collides with boost::process waiting for a child to finish!
https://jmmv.dev/2008/10/boostprocess-and-sigchld.html
Thus reset the SIGINT to its default, so that posix waitpid() and similar continue to work.
Fixes Crash on Eject in Second Instance on macOS #5507
2021-01-07 17:38:56 +01:00
2788ecd628 Fixed ASCII folding for non-foldable non-ASCII characters
Problem: Add an object, name it using cyrilic, Slice, click Export: the proposed name is mangled. Affects all platforms, 2.2.0 was fine.

Cause: It is mangled during ASCII folding, which was broken with 28c0880 when it was generalized to be used from the fuzzy matcher.
    fold_to_ascii(wchar_t c, char *out) relies on narrowing char = wchar_t assignment, the old one used std::back_insert_iterator<std::wstring>.
    It is thus unable to leave a character alone even when it should (it should, right?).

Solution:
    1. Typed the fold_to_ascii function so it works on wchar_t only, which should mimic the old behaviour.
    2. Changed the respective call in fts_fuzzy_match.h. That function also works with wide char C-strings.

Cleanup:
    1. Removed the unused fold_utf8_to_ascii(const char *src) overload to avoid code duplication.
    2. Untemplated the fold_to_ascii(wchar_t c, std::back_insert_iterator<std::wstring>& out) function, it was never called with a different type.
    3. The function is now static in ASCIIFolding.cpp, nobody else needs to know.
2020-12-21 10:31:37 +01:00
ff5db8bab8 Revert recent changes in PresetUpdater error reporting
This reverts commits:
57ba953 ("PresetUpdater - exceptions reformatted, not throwing an exception")
03028bb ("Improved exception throwing at copy file in preset updater")
2020-12-17 16:08:51 +01:00
f1f4d31ab5 Changed requested time of rendering for timed notification to full duration. Commented unused code. 2020-12-16 17:43:51 +01:00
57c0dd2b14 Localization: Updated PrusaSlicer.pot and CZ dictionary
+ Fixed some phrases.
2020-12-16 17:29:38 +01:00
9ca531bb30 render timer 2020-12-16 14:15:12 +01:00
e8fe841b79 render timer draft 2020-12-16 14:15:12 +01:00
cd105b53d5 Remove custom supports/seams after mesh repair
The repair can remove some of the triangles, so the custom data would make no sense.
This will hopefully fix #5458

Also, show a notification with a hyperlink to undo just before the repair.
2020-12-14 22:59:02 +01:00
d0db51f2e8 UndoRedo extension::
has_undo_snapshot(timestamp) to query whether one can undo to a snapshot
with a specific timestamp. Useful for notifications, that want to Undo
a specific operation, to verify whether such operation is still valid.
2020-12-14 16:22:40 +01:00
a1799de1e3 PresetUpdater - exceptions reformatted, not throwing an exception
on Linux when changing file attributes, as changing file attributes
may fail when writing onto FAT file system, which does not support
some of the common Unix file attributes.
2020-12-14 11:05:12 +01:00
82a7c0e3e0 Improved exception throwing at copy file in preset updater 2020-12-10 19:39:47 +01:00
78d566fc5b cleanup 2020-12-10 11:02:46 +01:00
e6c600c46f Ongoing uploads while exiting dialog
Ongoing uploads while exiting dialog

Ongoing uploads while exiting dialog
2020-12-10 11:02:46 +01:00
50d4914a6e Removed GLCanvas3D from parameters of NotificationManager methods 2020-11-30 13:45:17 +01:00
a0acb3ec81 Enable http digest authentication for CURL 2020-11-25 13:58:03 +01:00
048d0e2499 Fix of #5058 (failing build with wx3.0) 2020-11-04 11:58:45 +01:00
af0b587f1c Merge of pull request Add support for RepetierServer #4384 by @docbobo
with the following refactorings:

1) Removed the "printhost_slug" config from the Printer config
   and from all the Printer config related spots.
2) "printhost_slug" renamed to "printhost_port". Slug sounds nasty.
3) Improved error reporting of RepetierHost class.
4) Refactored for the new "Physical Printers"

Following refactorings were done independently of the Repetier pull request:
1) Removed PrintHost static print config.
2) Clean-up after conversion of print host configuration
   from Printer config to Physical Printer config.
3) Fixed some issues, where the Printer config was still queried for
   host configuration. Vojtech believes that this should not happen
   after the host configuration is converted to physical printers.

Vojtech still feels that more refactoring is needed in regard to porting
the host configuration from Printer profile to the new Physical Printer
profile.
2020-10-28 09:51:05 +01:00
4c7fc0ca74 Follow-up to
Use https in config update URLs

	http://files.prusa3d.com/* always redirects to HTTPS so use https scheme
    directly.

The pull request broke updates to those who installed configs with
http://, not https:// prefix.
2020-10-24 16:35:34 +02:00
d5e4bce750 Support for naming slicer own threads for debugging.
The following threads are named with this commit:
slic3r_main, slic3r_BackgroundSlicingProcess,
slic3r_tbbpool_xx_yy where xx is a one based index of the TTB thread
and yy is the platform thread ID.
2020-10-22 13:54:15 +02:00
54ee223161 Wifi Duet upload: Improved some string copying. 2020-10-21 14:42:08 +02:00
2862a6fb89 Fix debug build 2020-10-20 17:55:32 +02:00
8ae628fff9 Fixed a build 2020-10-20 17:23:57 +02:00
0319e7cf74 Tiny changes in the new Duet3D dsf support code 2020-10-19 17:23:13 +02:00
68a5e84ec1 Merge branch 'add-duet-software-framework-support' of https://github.com/Duet3D/PrusaSlicer into Duet3D-add-duet-software-framework-support 2020-10-19 11:50:31 +02:00
d977bffba9 Merge pull request #4213 from onovy/https
Use https in config update URLs
2020-10-17 21:13:43 +02:00
8634d4ca41 WIP Review of NotificationManager: Fixed some typos, added some comments. 2020-10-14 12:57:40 +02:00
68c2321d52 Added a missing include 2020-10-12 17:52:48 +02:00
fe618b04e3 starting prusaslicer from gcode viewer and vice versa, by menus or by stl drop on icon. Bring gcode viewer forward after start. 2020-10-12 15:26:19 +02:00
140cf15222 Maybe one day we will be able to run PrusaGCodeViewer, but for now the Apple notarization
process refuses Apps with multiple binaries and Vojtech does not know any workaround.
Just run PrusaSlicer and give it a --gcodeviewer parameter.
2020-10-01 15:11:56 +02:00
4e0a0c5c51 New class ModelConfig wrapping DynamicPrintConfig and a timestamp
to help with detecting "not changed" event when taking
Undo/Redo snapshot or synchronizing with the back-end.

Converted layer height profile and supports / seam painted areas
to the same timestamp controlled structure.
2020-09-24 15:34:13 +02:00
4abb613ead Undo/Redo serialization extension:
If an object indicates a valid timestamp, then the timestamp
is relied upon to not serialize the object data if the timestamp
of the same object on the undo/redo stack matches.
2020-09-23 12:18:39 +02:00
c25cd59e7e Added a missing include for gcc 2020-09-15 16:40:57 +02:00
f58ee46687 WIP Refactoring of exceptions:
1) All slicer's exceptions are now derived from Slic3r::Exception.
2) New exceptions are defined for slicing errors.
3) Exceptions are propagated to the Plater to show.
It remains to modify the slicing back-end to throw the new SlicingError
exceptions instead of std::runtime_error and to show the other exceptions
by a message dialog instead of a notification.
2020-09-14 18:03:22 +02:00
674cc646a0 Include PrintConfig for the definition of AuthorizationType 2020-09-11 16:51:05 +02:00
fc3b470ded Add missing forward declarations 2020-09-11 16:51:05 +02:00
41d1c4dd26 Fixed launching of new slicer instances on Windows. 2020-09-09 11:41:23 +02:00
1ee729d9ac Added networking support for SL1 Digest authorization.
Renamed login/password/authorization_type to printhost_user/printhost_password/printhost_authorization_type.
Added initialization of physical printer preset with default values.
2020-09-08 15:31:10 +02:00
125218c996 Fix of a preceding merge 2020-09-08 14:25:10 +02:00
9c9a215360 Fix of the previous merge, Windows specific. 2020-09-08 14:08:03 +02:00
f348a2541a Merge branch 'vb_gcodeviewer_menu' 2020-09-08 13:51:02 +02:00
651be5ad73 WIP Standalone G-code viewer 2020-09-08 13:33:43 +02:00
c79faa5e7e osx fix 2020-09-08 12:39:11 +02:00
c70e2199ed osx fix 2020-09-08 11:49:02 +02:00
c4c5a80a67 Another fix 2020-09-08 11:36:00 +02:00
53367f7aeb Trying to fix spawn on OSX 2020-09-08 11:22:27 +02:00