diff options
Diffstat (limited to 'src/libs/gui/PatchCanvas.cpp')
-rw-r--r-- | src/libs/gui/PatchCanvas.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/libs/gui/PatchCanvas.cpp b/src/libs/gui/PatchCanvas.cpp index 4fec2626..90e873a9 100644 --- a/src/libs/gui/PatchCanvas.cpp +++ b/src/libs/gui/PatchCanvas.cpp @@ -244,14 +244,13 @@ PatchCanvas::add_node(SharedPtr<NodeModel> nm) SharedPtr<PatchModel> pm = PtrCast<PatchModel>(nm); SharedPtr<NodeModule> module; - if (pm) + if (pm) { module = SubpatchModule::create(shared_this, pm); - else { + } else { module = NodeModule::create(shared_this, nm); - const PluginModel* plugm = - dynamic_cast<const PluginModel*>(nm->plugin()); - if (plugm) - module->set_icon(App::instance().icon_from_path(plugm->icon_path(), 100)); + const PluginModel* plugm = dynamic_cast<const PluginModel*>(nm->plugin()); + if (plugm && plugm->icon_path() != "") + module->set_icon(App::instance().icon_from_path(plugm->icon_path(), 100)); } add_item(module); |