From 37ac400f230591edb0e14efaaff50de127b7e19a Mon Sep 17 00:00:00 2001 From: Ad5001 Date: Tue, 15 Oct 2024 03:52:47 +0200 Subject: [PATCH] Enabling latex async generation by default, default LaTeX setting now depends on state of installation. --- runtime-pyside6/LogarithmPlotter/util/config.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/runtime-pyside6/LogarithmPlotter/util/config.py b/runtime-pyside6/LogarithmPlotter/util/config.py index ae10adb..e01deae 100644 --- a/runtime-pyside6/LogarithmPlotter/util/config.py +++ b/runtime-pyside6/LogarithmPlotter/util/config.py @@ -19,14 +19,16 @@ from os import path, environ, makedirs from platform import system from json import load, dumps +from shutil import which + from PySide6.QtCore import QLocale, QTranslator DEFAULT_SETTINGS = { "check_for_updates": True, "reset_redo_stack": True, "last_install_greet": "0", - "enable_latex": False, - "enable_latex_async": False, + "enable_latex": which("latex") is not None and which("dvipng") is not None, + "enable_latex_async": True, "expression_editor": { "autoclose": True, "colorize": True,