Skip to content

Commit

Permalink
Fix #1054 3D Color setting. Still needs restart
Browse files Browse the repository at this point in the history
Color settings were copied from PronterWindow.settings
to PronterWindow before reading them from config file
into PronterWindow.settings.
  • Loading branch information
volconst committed Jun 3, 2020
1 parent 1423eb4 commit 68f9fde
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions printrun/pronterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,6 @@ def __init__(self, app, filename = None, size = winsize):
self.ui_ready = False
self._add_settings(size)

for field in dir(self.settings):
if field.startswith("_gcview_color_"):
cleanname = field[1:]
color = hexcolor_to_float(getattr(self.settings, cleanname), 4)
setattr(self, cleanname, list(color))

self.pauseScript = None #"pause.gcode"
self.endScript = None #"end.gcode"

Expand All @@ -172,8 +166,14 @@ def __init__(self, app, filename = None, size = winsize):
self.btndict = {}
self.filehistory = None
self.autoconnect = False
self.autoscrolldisable = False

self.parse_cmdline(sys.argv[1:])
self.autoscrolldisable=False
for field in dir(self.settings):
if field.startswith("_gcview_color_"):
cleanname = field[1:]
color = hexcolor_to_float(getattr(self.settings, cleanname), 4)
setattr(self, cleanname, list(color))

# FIXME: We need to initialize the main window after loading the
# configs to restore the size, but this might have some unforeseen
Expand Down

0 comments on commit 68f9fde

Please sign in to comment.