Added option to enable rendering return types in sequence diagrams (fixes #93)

This commit is contained in:
Bartek Kryza
2023-07-04 00:38:42 +02:00
parent d944a2cead
commit 2104d930a8
19 changed files with 274 additions and 29 deletions

View File

@@ -312,6 +312,16 @@ void diagram::finalize()
assert(block_nest_level >= 0);
}
else {
if (m.type() == message_t::kCall) {
// Set the message return type based on the callee return
// type
auto to_participant =
get_participant<sequence_diagram::model::function>(
m.to());
if (to_participant.has_value()) {
m.set_return_type(to_participant.value().return_type());
}
}
block_message_stack.back().push_back(m);
}
}