Solver: Run: Close checklist at solver run, resize solver window and fix empty message.

setup.py
Pierre-Antoine Rouby 2024-02-07 10:21:07 +01:00
parent 630eb98343
commit 5619b98468
3 changed files with 8 additions and 4 deletions

View File

@ -167,6 +167,7 @@ class CheckListWindow(PamhyrWindow):
self.find(QPushButton, "pushButton_ok").setEnabled(True) self.find(QPushButton, "pushButton_ok").setEnabled(True)
if self._autorun: if self._autorun:
self._parent.solver_log(self._solver) self._parent.solver_log(self._solver)
self.end()
self.update_statusbar() self.update_statusbar()

View File

@ -225,8 +225,11 @@ class SolverLogWindow(PamhyrWindow):
self._log_int(msg, color) self._log_int(msg, color)
def _log_str(self, msg, color=None): def _log_str(self, msg, color=None):
if msg == "":
return
logger.info(f"solver: {msg}") logger.info(f"solver: {msg}")
msg = msg.rsplit('\n')[0] msg = msg.rsplit('\n', 1)[0]
if color is not None: if color is not None:
msg = f"<font color=\"{color}\">" + msg + "</font>" msg = f"<font color=\"{color}\">" + msg + "</font>"

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>640</width> <width>1152</width>
<height>480</height> <height>648</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -43,7 +43,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>640</width> <width>1152</width>
<height>22</height> <height>22</height>
</rect> </rect>
</property> </property>