From 911f2d3b5194437735289ee3714e1e4e2c3079bf Mon Sep 17 00:00:00 2001 From: uenz Date: Mon, 28 Dec 2020 21:15:27 +0100 Subject: [PATCH 1/3] Fixed call of on_file_new --- tclCommands/TclCommandNew.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tclCommands/TclCommandNew.py b/tclCommands/TclCommandNew.py index 9a2af1f2..c5f76575 100644 --- a/tclCommands/TclCommandNew.py +++ b/tclCommands/TclCommandNew.py @@ -39,4 +39,4 @@ class TclCommandNew(TclCommand): :return: None or exception """ - self.app.on_file_new(cli=True) + self.app.f_handlers.on_file_new(cli=True) From e5a3f79bef564822c60dbf35d67b525c40987096 Mon Sep 17 00:00:00 2001 From: uenz Date: Tue, 29 Dec 2020 13:48:49 +0100 Subject: [PATCH 2/3] Take fontsize from config textbook_font_size --- appTools/ToolShell.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/appTools/ToolShell.py b/appTools/ToolShell.py index 02e093e0..97c94cdc 100644 --- a/appTools/ToolShell.py +++ b/appTools/ToolShell.py @@ -7,7 +7,7 @@ # ########################################################## -from PyQt5.QtCore import Qt +from PyQt5.QtCore import Qt, QSettings from PyQt5.QtGui import QTextCursor, QPixmap from PyQt5.QtWidgets import QVBoxLayout, QWidget, QHBoxLayout, QLabel from appGUI.GUIElements import _BrowserTextEdit, _ExpandableTextEdit, FCLabel @@ -41,7 +41,12 @@ class TermWidget(QWidget): self.app = app self._browser = _BrowserTextEdit(version=version, app=app) - self._browser.setStyleSheet("font: 9pt \"Courier\";") + qsettings = QSettings("Open Source", "FlatCAM") + if qsettings.contains("textbox_font_size"): + tb_fsize = qsettings.value('textbox_font_size', type=int) + else: + tb_fsize = 9 + self._browser.setStyleSheet("font: {0}pt \"Courier\";".format(tb_fsize)) self._browser.setReadOnly(True) self._browser.document().setDefaultStyleSheet( self._browser.document().defaultStyleSheet() + @@ -478,7 +483,8 @@ class FCShell(TermWidget): trc_formated = [] for a in reversed(trc): trc_formated.append(a.replace(" ", " > ").replace("\n", "")) - text = "%s\nPython traceback: %s\n%s" % (exc_value, exc_type, "\n".join(trc_formated)) + text = "%s\nPython traceback: %s\n%s" % ( + exc_value, exc_type, "\n".join(trc_formated)) else: text = "%s" % error else: From 80e13df8199aa61daecc1e852d431b33ff6ebe9b Mon Sep 17 00:00:00 2001 From: hans boot Date: Thu, 31 Dec 2020 18:24:32 +0100 Subject: [PATCH 3/3] this seemed needed for Ubuntu 20.04 LTS --- setup_ubuntu.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup_ubuntu.sh b/setup_ubuntu.sh index fec5b612..cba3ecd5 100644 --- a/setup_ubuntu.sh +++ b/setup_ubuntu.sh @@ -44,6 +44,8 @@ sudo -H python3 -m pip install --upgrade \ qrcode \ pyqt5 \ reportlab \ - svglib + svglib \ + pyserial \ + testresources sudo -H easy_install -U distribute