From 970214fd33e38fd4b3d7798e3c3b41114d393abc Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Fri, 17 Nov 2017 07:42:07 -0500 Subject: [PATCH] Add "Manufacturers" label to AddModuleWindow --- src/app/AddModuleWindow.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/AddModuleWindow.cpp b/src/app/AddModuleWindow.cpp index 5e6bf541..48f2d91d 100644 --- a/src/app/AddModuleWindow.cpp +++ b/src/app/AddModuleWindow.cpp @@ -183,6 +183,8 @@ struct ManufacturerMenu : ListMenu { std::string filter; ManufacturerMenu() { + addChild(construct(&MenuLabel::text, "Manufacturers")); + // Collect manufacturer names std::set manufacturers; for (Plugin *plugin : gPlugins) { @@ -205,7 +207,8 @@ struct ManufacturerMenu : ListMenu { // Make children with a matching model visible for (Widget *child : children) { MenuItem *item = dynamic_cast(child); - assert(item); + if (!item) + continue; std::string manufacturer = item->text; for (Plugin *plugin : gPlugins) { @@ -282,9 +285,6 @@ AddModuleWindow::AddModuleWindow() { metadataScroll->box.pos = Vec(400, posY); metadataScroll->box.size = Vec(200, box.size.y - posY); addChild(metadataScroll); - - // NVGcolor c = bndTransparent(nvgRGB(0, 0, 0)); - NVGcolor c = bndGetTheme()->nodeTheme.nodeBackdropColor; }