Autosave rule edits and sort centered table controls

This commit is contained in:
AttilaNet
2026-11-08 10:28:55 +08:00
parent aa27b1673d
commit d0fd15c785
10 changed files with 402 additions and 54 deletions
+2 -1
View File
@@ -2,6 +2,7 @@
import json
from pathlib import Path
from PySide6 import QtCore as C, QtGui as G, QtWidgets as W
from .table_widgets import table_item
class DebugWindow(W.QDialog):
@@ -51,7 +52,7 @@ class DebugWindow(W.QDialog):
if event["kind"] == "error" and event.get("scope") == "local":
values[2] = "本地错误"
for index, value in enumerate(values):
self.rows.setItem(row, index, W.QTableWidgetItem(str(value)))
self.rows.setItem(row, index, table_item(value, index))
# Follow the newest record unless the user is inspecting an older row.
if row == 0 or self.rows.currentRow() in (-1, row - 1) or event["kind"] == "error":
self.rows.selectRow(row)