mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 16:56:53 +08:00
refs #336 CStatusMessage keeps track of which objects have handled it, to avoid duplicate handlings of the same message.
This commit is contained in:
@@ -306,12 +306,16 @@ namespace BlackCore
|
||||
{
|
||||
if (!this->m_simulator) return;
|
||||
if (statusMessage.getSeverity() != CStatusMessage::SeverityError) return;
|
||||
|
||||
if (statusMessage.wasHandledBy(this)) return;
|
||||
statusMessage.markAsHandledBy(this);
|
||||
|
||||
this->m_simulator->displayStatusMessage(statusMessage);
|
||||
}
|
||||
|
||||
void CContextSimulator::ps_statusMessagesReceived(const CStatusMessageList &statusMessages)
|
||||
{
|
||||
foreach(CStatusMessage m, statusMessages)
|
||||
for(const CStatusMessage &m : statusMessages)
|
||||
{
|
||||
this->ps_statusMessageReceived(m);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user