mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 23:20:05 +00:00
Update alert signal to include message index, so messages aren't missed
This commit is contained in:
parent
5784abc117
commit
1c5e0d51b7
4 changed files with 16 additions and 12 deletions
|
|
@ -171,7 +171,8 @@ AlertModel::headerData(int section, Qt::Orientation orientation, int role) const
|
|||
return QVariant();
|
||||
}
|
||||
|
||||
void AlertModel::HandleAlert(const types::TextEventKey& alertKey)
|
||||
void AlertModel::HandleAlert(const types::TextEventKey& alertKey,
|
||||
size_t messageIndex)
|
||||
{
|
||||
logger_->trace("Handle alert: {}", alertKey.ToString());
|
||||
|
||||
|
|
@ -181,7 +182,7 @@ void AlertModel::HandleAlert(const types::TextEventKey& alertKey)
|
|||
auto alertMessages =
|
||||
manager::TextEventManager::Instance().message_list(alertKey);
|
||||
std::shared_ptr<const awips::Segment> alertSegment =
|
||||
alertMessages.back()->segments().back();
|
||||
alertMessages[messageIndex]->segments().back();
|
||||
|
||||
if (alertSegment->codedLocation_.has_value())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public:
|
|||
int role = Qt::DisplayRole) const override;
|
||||
|
||||
public slots:
|
||||
void HandleAlert(const types::TextEventKey& alertKey);
|
||||
void HandleAlert(const types::TextEventKey& alertKey, size_t messageIndex);
|
||||
void HandleMapUpdate(double latitude, double longitude);
|
||||
|
||||
private:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue