Cabana: fix signal list glitch (#26357)

* fix signal list glitch

* fix glitch when open new msg

* reduce spacing

* fix binaryview glitch

* spacing 3

* create form on demand

* dont close form after save

* remove timer

* remove sizepolicy

* cleanup
old-commit-hash: 0e3edf7877e2a219ae67f7e71d36d8458d50f7e4
This commit is contained in:
Dean Lee
2022-11-05 02:16:15 +08:00
committed by GitHub
parent d3c22d56ac
commit 5d965010be
6 changed files with 76 additions and 69 deletions
+4 -7
View File
@@ -11,7 +11,7 @@
// BinaryView
const int CELL_HEIGHT = 30;
const int CELL_HEIGHT = 26;
BinaryView::BinaryView(QWidget *parent) : QTableView(parent) {
model = new BinaryViewModel(this);
@@ -105,15 +105,9 @@ void BinaryView::leaveEvent(QEvent *event) {
}
void BinaryView::setMessage(const QString &message_id) {
msg_id = message_id;
model->setMessage(message_id);
clearSelection();
updateState();
updateGeometry();
}
void BinaryView::updateState() {
model->updateState();
}
const Signal *BinaryView::getResizingSignal() const {
@@ -176,6 +170,9 @@ void BinaryViewModel::setMessage(const QString &message_id) {
items[idx].sigs.push_back(&dbc_msg->sigs[i]);
}
}
} else {
row_count = can->lastMessage(msg_id).dat.size();
items.resize(row_count * column_count);
}
endResetModel();