From 9e2ce70b427775b399a9d127a5ad993b95d45f33 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Mon, 9 May 2022 17:09:53 +0300 Subject: [PATCH] - made sure that clicking the text in the InfoBar will also toggle the Tcl Shell display as is the click on the Infobar itself --- CHANGELOG.md | 1 + appGUI/GUIElements.py | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bac377d6..e087f0f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ CHANGELOG for FlatCAM Evo beta - fixed an issue in the Paint Plugin where some polygons are discarded in a Geometry object made out of an imported SVG - fixed an issue in the SVG parser where when parsing a path and getting multiple polygons will generate an invalid compound polygon (the polygons other than the first are seen as interiors even if they are not inside the first) +- made sure that clicking the text in the InfoBar will also toggle the Tcl Shell display as is the click on the Infobar itself 6.05.2022 diff --git a/appGUI/GUIElements.py b/appGUI/GUIElements.py index 8d5ced51..aa2e5de6 100644 --- a/appGUI/GUIElements.py +++ b/appGUI/GUIElements.py @@ -5561,7 +5561,7 @@ class AppInfoBar(QtWidgets.QWidget): # for the usage of this label as a clickable label, to know that current state self.clicked_state = False - self.icon = FCLabel(self) + self.icon = FCLabel(parent=self) self.icon.setGeometry(0, 0, 12, 12) self.pmap = QtGui.QPixmap(self.app.resource_location + '/graylight12.png') self.icon.setPixmap(self.pmap) @@ -5580,13 +5580,16 @@ class AppInfoBar(QtWidgets.QWidget): self.blue_pamap = QtGui.QPixmap(self.app.resource_location + '/bluelight12.png') self.gray_pmap = QtGui.QPixmap(self.app.resource_location + '/graylight12.png') - self.text = FCLabel(self) + self.text = FCLabel(parent=self) self.text.setText(_("Application started ...")) self.text.setToolTip(_("Hello!")) layout.addWidget(self.text) layout.addStretch() + # Signals + self.text.clicked.connect(lambda x: self.clicked.emit(x)) + def mousePressEvent(self, event): if event.button() == Qt.MouseButton.LeftButton: self.clicked_state = not self.clicked_state