Improved sequence diagram message comment formatting

This commit is contained in:
Bartek Kryza
2023-10-16 21:47:46 +02:00
parent 03e8c867f4
commit 1616f79ceb
5 changed files with 90 additions and 12 deletions

View File

@@ -287,19 +287,10 @@ void generator::generate_message_comment(
if (!from)
return;
if (m.type() == message_t::kCall) {
const auto &to = model().get_participant<model::participant>(m.to());
if (!to)
return;
ostr << "note over " << generate_alias(from.value()) << '\n';
ostr << "note over " << generate_alias(from.value()) << ", "
<< generate_alias(to.value()) << '\n';
}
else {
ostr << "note over " << generate_alias(from.value()) << '\n';
}
ostr << util::format_message_comment(m.comment().value()) << '\n';
ostr << m.comment().value() << '\n';
ostr << "end note" << '\n';
}