修复不能正常显示总数的问题
This commit is contained in:
parent
ed5b11fbc8
commit
71c73b39ed
@ -337,13 +337,10 @@ class Application(QMainWindow):
|
|||||||
old_data = convert_data(old_data_str)
|
old_data = convert_data(old_data_str)
|
||||||
new_data = convert_data(new_data)
|
new_data = convert_data(new_data)
|
||||||
if old_data != new_data:
|
if old_data != new_data:
|
||||||
self.handle_data_change(table, col, new_data - old_data, account_username, notifications)
|
count_change = new_data - old_data
|
||||||
|
self.update_cell_color(table, row, col, count_change)
|
||||||
def handle_data_change(self, table, col, count_change, account_username, notifications):
|
# 确保传递 cell_data 和 count_change 参数
|
||||||
"""处理表格数据变更,更新单元格颜色,并生成通知"""
|
self.generate_notifications(account_username, col, new_data, count_change, notifications)
|
||||||
self.update_cell_color(table, table.rowCount() - 1, col, count_change)
|
|
||||||
self.generate_notifications(account_username, col, col, count_change, notifications)
|
|
||||||
|
|
||||||
def update_cell_color(self, table, row, col, count_change):
|
def update_cell_color(self, table, row, col, count_change):
|
||||||
"""更新单元格颜色"""
|
"""更新单元格颜色"""
|
||||||
cell = table.item(row, col)
|
cell = table.item(row, col)
|
||||||
|
Loading…
Reference in New Issue
Block a user