Cabana: fix update issues when the the replay is paused (#26311)

fix state not updated if replay is paused
old-commit-hash: 6ca6a26d4c12ab0813c8474eb1a9bed6f69374ee
This commit is contained in:
Dean Lee
2022-11-02 00:31:47 +08:00
committed by GitHub
parent 9e033f6d7e
commit 1e30802b36
3 changed files with 7 additions and 1 deletions
+1
View File
@@ -155,6 +155,7 @@ void ChartsWidget::showChart(const QString &id, const Signal *sig, bool show) {
charts_layout->insertWidget(0, chart);
charts.push_back(chart);
emit chartOpened(chart->id, chart->signal);
updateState();
}
updateTitleBar();
}
+5
View File
@@ -147,6 +147,11 @@ QVariant MessageListModel::data(const QModelIndex &index, int role) const {
return {};
}
void MessageListModel::setFilterString(const QString &string) {
filter_str = string;
updateState(true);
}
bool MessageListModel::updateMessages(bool sort) {
if (msgs.size() == can->can_msgs.size() && filter_str.isEmpty() && !sort)
return false;
+1 -1
View File
@@ -38,7 +38,7 @@ public:
int rowCount(const QModelIndex &parent = QModelIndex()) const override { return msgs.size(); }
void sort(int column, Qt::SortOrder order = Qt::AscendingOrder) override;
void updateState(bool sort = false);
void setFilterString(const QString &string) { filter_str = string; }
void setFilterString(const QString &string);
private:
bool updateMessages(bool sort);