From 68f9fde70a1d98ca9df763ffd486b2d3a15c9a1d Mon Sep 17 00:00:00 2001 From: Cura <20997907+volconst@users.noreply.github.com> Date: Wed, 3 Jun 2020 23:07:22 +0300 Subject: [PATCH] Fix #1054 3D Color setting. Still needs restart Color settings were copied from PronterWindow.settings to PronterWindow before reading them from config file into PronterWindow.settings. --- printrun/pronterface.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/printrun/pronterface.py b/printrun/pronterface.py index 2d794d502..b44fa9db0 100644 --- a/printrun/pronterface.py +++ b/printrun/pronterface.py @@ -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" @@ -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