Skip to content

Commit

Permalink
app: adds error message when trying to import HSM
Browse files Browse the repository at this point in the history
  • Loading branch information
quesnel committed Jun 10, 2024
1 parent 5b3a8f5 commit 5761e9e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion app/gui/generic/modeling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,16 @@ static void show_popup_menuitem(component_editor& ed,
if (c_id != undefined<component_id>())
if_data_exists_do(
app.mod.components, c_id, [&](auto& compo) noexcept {
add_component_to_current(ed, data, parent, s_parent, compo);
if (compo.type == component_type::hsm)
app.notifications.try_insert(
log_level::error, [](auto& title, auto& msg) noexcept {
title = "Component editor";
msg = "Please, use the hsm_wrapper model to add a "
"hierarchical state machine";
});
else
add_component_to_current(
ed, data, parent, s_parent, compo);
});

ImGui::Separator();
Expand Down

0 comments on commit 5761e9e

Please sign in to comment.