mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-15 18:57:52 -06:00
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.
This commit is contained in:
parent
c8f73d303e
commit
051dd7a6e9
14 changed files with 521 additions and 471 deletions
|
@ -24,7 +24,7 @@ class ConvexHullNode(SceneNode):
|
|||
self._original_parent = parent
|
||||
|
||||
# Color of the drawn convex hull
|
||||
if Application.getInstance().hasGui():
|
||||
if not Application.getInstance().getIsHeadLess():
|
||||
self._color = Color(*Application.getInstance().getTheme().getColor("convex_hull").getRgb())
|
||||
else:
|
||||
self._color = Color(0, 0, 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue