fixed the text color change after an error in the log

This commit is contained in:
Sergey Palcheh
2025-10-21 14:36:47 +06:00
parent 5b21015aee
commit 49c1ac6846

View File

@@ -14,7 +14,7 @@ from PyQt5.QtWidgets import (QApplication, QMainWindow, QWidget, QVBoxLayout, QH
QTextEdit, QFileDialog, QMessageBox, QLineEdit, QCheckBox, QStackedWidget, QScrollArea, QFormLayout, QGroupBox, QRadioButton, QComboBox,
QListWidget, QListWidgetItem, QGridLayout, QFrame, QDialog, QTextBrowser, QInputDialog, QDialogButtonBox, QSystemTrayIcon, QMenu)
from PyQt5.QtCore import Qt, QProcess, QSize, QTimer, QProcessEnvironment, QPropertyAnimation, QEasingCurve, pyqtSignal
from PyQt5.QtGui import QIcon, QFont, QTextCursor, QPixmap, QPainter, QCursor
from PyQt5.QtGui import QIcon, QFont, QTextCursor, QPixmap, QPainter, QCursor, QTextCharFormat
from PyQt5.QtNetwork import QLocalServer, QLocalSocket
@@ -870,6 +870,9 @@ class WinetricksManagerDialog(QDialog):
"Подробности смотрите в логе.",
QMessageBox.Warning,
{"buttons": {"OK": QMessageBox.AcceptRole}})
# Сбрасываем формат символов к значению по умолчанию.
# Это гарантирует, что следующий вызов append() не унаследует красный цвет.
self.log_output.setCurrentCharFormat(QTextCharFormat())
self.apply_button.setEnabled(True)
self.close_button.setEnabled(True)
return