mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-01 03:22:07 +08:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user