Skip to content

Commit

Permalink
- Addressed review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
eoyilmaz committed Mar 26, 2024
1 parent 8208e0e commit 602cfc5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion DisplayCAL/argyll_instruments.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
"sensor_cal": True,
"skip_sensor_cal": True,
"integration_time": [9.2, 3.9], # Still just using i1 Pro values
"refresh": False,
"refresh": True,
},
"ColorHug": {
"usb_ids": [
Expand Down
10 changes: 6 additions & 4 deletions DisplayCAL/display_cal.py
Original file line number Diff line number Diff line change
Expand Up @@ -10985,7 +10985,7 @@ def just_measure_finish(self, result):
except Exception as exception:
wx.CallAfter(show_result_dialog, exception, self)
else:
if cgats.queryv1("INSTRUMENT_TYPE_SPECTRAL").decode("utf-8") == "YES":
if cgats.queryv1("INSTRUMENT_TYPE_SPECTRAL") == b"YES":
setcfg("last_reference_ti3_path", cgats.filename)
else:
setcfg("last_colorimeter_ti3_path", cgats.filename)
Expand Down Expand Up @@ -13218,12 +13218,12 @@ def correction_type_handler(event):
display = (
meta.get("EDID_model", meta.get("EDID_model_id", {}))
.get("value", "")
.encode("utf-8")
.encode("utf-7")
)
manufacturer = (
meta.get("EDID_manufacturer", {})
.get("value", "")
.encode("utf-8")
.encode("utf-7")
)
cgats.ARGYLL_COLPROF_ARGS.add_data(
'-M "%s" -A "%s"' % (display, manufacturer)
Expand Down Expand Up @@ -13511,7 +13511,9 @@ def correction_type_handler(event):
dlg.sizer3.Add(boxsizer, 1, flag=wx.TOP | wx.EXPAND, border=12)
if sys.platform not in ("darwin", "win32"):
boxsizer.Add((1, 8))
if not display: display = self.worker.get_display_name(False, True, False) # protects from an improperly formatted display name in the ref.ti3
if not display:
# protects from an improperly formatted display name in the ref.ti3
display = self.worker.get_display_name(False, True, False)
dlg.display_txt_ctrl = wx.TextCtrl(dlg, -1, display, size=(400, -1))
boxsizer.Add(
dlg.display_txt_ctrl,
Expand Down
11 changes: 8 additions & 3 deletions DisplayCAL/wxCCXXPlot.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,12 +347,17 @@ def __init__(self, parent, cgats, worker=None):
x_label.extend(["%9.6f %9.6f %9.6f" % tuple(row) for row in mtx])
if ref:
ref_observer = cgats.queryv1("REFERENCE_OBSERVER")
if ref_observer is not None: # If the .ccmx does not contain this value, the graph will still draw
ref += ", " + observers_ab.get(ref_observer.decode("utf-8"), ref_observer.decode("utf-8"))
if ref_observer:
# If the .ccmx does not contain this value,
# the graph will still draw
ref_observer = ref_observer.decode("utf-8")
ref += ", " + observers_ab.get(ref_observer, ref_observer)
x_label.append("")
x_label.append(ref)
fit_method = cgats.queryv1("FIT_METHOD")
if fit_method is not None and fit_method.decode("utf-8") == "xy": # If the .ccmx does not contain this value, the graph will still draw
if fit_method == b"xy":
# If the .ccmx does not contain this value,
# the graph will still draw
fit_method = lang.getstr("ccmx.use_four_color_matrix_method")
elif fit_method:
fit_method = lang.getstr("perceptual")
Expand Down

0 comments on commit 602cfc5

Please sign in to comment.