136 Commits

Author SHA1 Message Date
Aleksei S
9bd4ab2faa Added unittest for PrintInformation class 2018-09-28 10:46:14 +02:00
Ghostkeeper
eac70dc06d
Change default print job name to 'Untitled'
This is more common for documents that don't yet have a title in many applications.
2018-08-27 09:41:19 +02:00
Diego Prado Gesto
d57090c049 Allow the user to change the name and even though the name in the
different buildplates will change accordingly to the build plate number.
2018-08-01 12:53:07 +02:00
Jack Ha
e557751752 Add the active build plate name to default (not user specified) job name 2018-07-31 11:31:46 +02:00
Ghostkeeper
1016564df0
Fix spelling 2018-07-25 16:48:32 +02:00
Lipu Fei
7f7a195627 Fix merge conflicts from 3.4 2018-06-05 09:02:52 +02:00
Lipu Fei
98aaaba594 Only update job_name to unnamed but not base_name
CURA-5367

Only update job_name to "unnamed" if it's empty. Do not change
base_name.
2018-06-05 08:33:59 +02:00
Jack Ha
f29b4326cc Merge branch '3.4' 2018-06-04 12:54:07 +02:00
Aleksei S
a9095f2b77 After command "Undo" the project name was empty
CURA-5367
2018-06-04 11:46:51 +02:00
Lipu Fei
eb949472e8 Merge remote-tracking branch 'origin/master' into WIP_improve_initialization 2018-05-31 13:47:27 +02:00
Lipu Fei
11db13aa28 Clear is_user_specified_job_name flag when setting a project file name
CURA-5280
2018-05-30 09:07:02 +02:00
Lipu Fei
fed0a015ee Clear is_user_specified_job_name flag when setting a project file name
CURA-5280
2018-05-29 15:56:01 +02:00
Lipu Fei
f395f1eebc
Merge branch 'master' into WIP_improve_initialization 2018-05-28 13:37:26 +02:00
Lipu Fei
689b88a024 Do not change prefix for user-specified job names
CURA-5280
2018-05-28 09:53:49 +02:00
Diego Prado Gesto
5704a7b184 Merge branch 'master' into WIP_improve_initialization
Conflicts:
	cura/AutoSave.py
	cura/BuildVolume.py
	cura/CuraApplication.py

Contributes to CURA-5164
2018-05-25 09:40:42 +02:00
Lipu Fei
a0a8af07dc Upon manual job name change, only save the real base name
CURA-5280

Remove the machine prefix in the base name, otherwise when the machine
gets changed, the job name will become
"<new-machine>_<old_machine>_basename".
2018-05-23 16:42:13 +02:00
Ian Paschal
e89bd91960 CURA-5280 Preserve manually entered project name
Heeeehhhhh? Why didn't this line get staged with the file?
2018-05-23 16:31:22 +02:00
Ian Paschal
d14f4ac678 CURA-5280 Preserve manually entered project name
Manual override of job name should also set the base name so that when the printer prefix is updated, it the prefix can be added to the manually added name, not the old base name.

This was a bit tricky because if you enter a job name, is that the job name or the base name? My answer is that it's both, and if you update your printer for the job, it will append a new prefix.

If this is not the desired behavior, and in fact once a custom name is set nothing can change it, then line 78 should be removed.
2018-05-23 16:28:35 +02:00
Diego Prado Gesto
e38b31c0eb Merge branch 'master' into WIP_improve_initialization 2018-05-16 16:57:51 +02:00
Jack Ha
ed1ba41aa6 Undo setting wrong name in PrintInformation. CURA-5323 2018-05-15 11:42:17 +02:00
alekseisasin
d433c54a0a If the file type is not registered still show it's name in project field CURA-5323 2018-05-14 17:42:54 +02:00
Diego Prado Gesto
8ad409ff55
Merge branch 'master' into WIP_improve_initialization 2018-05-14 15:15:02 +02:00
Diego Prado Gesto
43657010ba CURA-5164 The Preferences is not a singleton class anymore since in some point
several instances need to be created.

- In the ThreeMFWorkspaceReader we need to create some temporal
instances of Preferences that makes it not singleton anymore.

- The current preferences are kept in the Application class and so all
the calls to the preferences are changed to get the preferences from
Application.

- The method getInstance in Preferences is kept as deprecated since some
external plugins.
2018-05-11 08:50:42 +02:00
Aleksei S
9779c41071 Use MimeTypeDatabase to find loaded file extension and set proper project name
CURA-5323
2018-05-08 10:47:59 +02:00
Aleksei S
dfd9283ed5 Project name after importing
CURA-5323
2018-05-04 10:29:09 +02:00
Lipu Fei
051dd7a6e9 WIP: Make application initialization and start up more clear
- Create SingleInstance class to handling single instance stuff.
 - Instead of calling getInstance() everywhere, initialize each object
   explicitly in order when application starts and getInstance()s do not
   create instances any more and they merely return the created
   instances.
 - Only set initial values in construtor functions __init__(). Move the
   initialization of context-aware (i.e. things that depend on other
   things) to separate functions.
 - Split application creation and initialziation into several steps and
   them should be called explicitly in the correct order.
2018-05-04 09:57:02 +02:00
Aleksei S
defb22dc07 Keep 'dot' in file name for type *.gcode.gz
CURA-5323
2018-05-03 18:11:45 +02:00
Aleksei S
b1c9b04a7a Fix: filenames cut by first dot, remove only file extension because file might have dot in name
CURA-5323
2018-05-02 17:17:45 +02:00
Diego Prado Gesto
626c424a02 CURA-5246 Just update the job name when it must be updated. 2018-04-20 15:00:40 +02:00
Lipu Fei
f24e1da934 Always update job name for gcode files
CURA-5246
2018-04-19 09:17:22 +02:00
Lipu Fei
83c728c89e Update job name when pre-sliced flag changes
CURA-5246
2018-04-18 10:24:58 +02:00
Lipu Fei
f97e615634 Fix file name update
CURA-5122
2018-03-20 11:30:06 +01:00
Lipu Fei
6199e8e15a Fix merge conflicts with master 2018-03-05 13:27:00 +01:00
Ghostkeeper
32fedf9559
Obtain filament diameter from stack for length calculation
Otherwise we get it from the global stack which is always 2.85mm.

Fixes #3284.
2018-03-05 13:02:11 +01:00
Lipu Fei
f7377e6321 Fix extruder_stacks.items() 2018-03-02 16:20:03 +01:00
Lipu Fei
a6f22fd9cc Remove unnecessary comments 2018-03-02 16:10:59 +01:00
Lipu Fei
2135e30aad Simplify for loop in _calculateInformation() 2018-03-02 16:10:06 +01:00
Lipu Fei
d9d2cc9069 Remove unused code in PrintInformation 2018-02-26 19:37:29 +01:00
Jack Ha
2df9802ba5 CURA-4606 CURA-5010 fix print information crashing on printer switch 2018-02-26 09:57:16 +01:00
Lipu Fei
32e1015f25 WIP: Cleanup PrintInformation 2018-02-22 16:07:56 +01:00
Lipu Fei
495fc8bbd7 WIP: Refactor BuildPlateModel and split MultiBuildPlateModel 2018-02-17 22:24:05 +01:00
Diego Prado Gesto
a4df9b6cc6 CURA-4891 Add a '+' that I removed by accident 2018-02-14 15:02:53 +01:00
Diego Prado Gesto
605c63514d CURA-4891 Remove print out for debugging 2018-02-14 14:51:32 +01:00
Diego Prado Gesto
a4455bbbe5 CURA-4891 Use the printer definition name instead of the ID to generate
the abbreviated name.
- Also revert some previous changes to keep the same behavior as before.
2018-02-14 13:47:30 +01:00
Ian Paschal
2964bedc28 CURA-4891
Scan for 'ultimaker' in the name. If found, add 'UM' to abbreviation, and scan again for a number after 'ultimaker' (e.g. 'ultimaker3'). If found, add the number as well. If 'ultimaker' is not found, take either the first 4 letters of the name or first letter.
2018-02-12 14:58:55 +01:00
Jaime van Kessel
2dee2ce5d9 Fixed issue where optimized layer data could be empty 2018-02-05 13:16:39 +01:00
Lipu Fei
a3ed385259 Use global_stack.definition.getId() to determine machine type
CURA-4891
2018-02-02 14:47:14 +01:00
Ian Paschal
a786987d8d Fix for CURA-4891
Use `active_machine_id` (such as "Ultimaker 3") instead of `global_stack_name` (such as "My Custom Printer Name")
2018-02-02 14:02:06 +01:00
ChrisTerBeke
6c9d7b5a2e Fixes for resetting print time information when removing all or last model, reduce signals being used for print time resetting - CURA-4852 2018-01-23 09:49:26 +01:00
Ghostkeeper
f948203a63
Fix crash when clearing build plate
We shouldn't delete the singleton PrintInformation object. We should rather just zero out the print information. And instead of doing that explicitly in deleteAll, listen to scene changes from PrintInformation in order to keep the logic related to the print information contained within its class.

Contributes to issue CURA-4810.
2018-01-16 13:44:49 +01:00