fix an issue that internal node types of Node/Network are not shown in a type list while adding new Node
This commit is contained in:
@@ -1081,11 +1081,6 @@ void Network::NetworkEditor() noexcept {
|
||||
ItemAdder(pos);
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
if (ImGui::MenuItem("add terminal")) {
|
||||
ExecAddItem(
|
||||
std::make_unique<Item>(next_++, std::make_unique<Terminal>(env())),
|
||||
pos);
|
||||
}
|
||||
ImGui::Separator();
|
||||
if (ImGui::MenuItem("undo", nullptr, false, !!history_.prev())) {
|
||||
UnDo();
|
||||
@@ -1121,7 +1116,7 @@ void Network::ItemAdder(const ImVec2& pos) noexcept {
|
||||
if (ImGui::BeginListBox("type", {16*em, 8*em})) {
|
||||
for (auto& p : nf7::File::registry()) {
|
||||
const auto& t = *p.second;
|
||||
if (!t.flags().contains("nf7::Node")) {
|
||||
if (!t.flags().contains("nf7::Node") && !t.name().starts_with("Node/Network/")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user