| 39 | |
| 40 | |
| 41 | void ModuleChooserUI::buildModuleBox() |
| 42 | { |
| 43 | clear(dontSendNotification); |
| 44 | if (ModuleManager::getInstanceWithoutCreating() == nullptr) return; |
| 45 | for (auto &m : ModuleManager::getInstance()->items) |
| 46 | { |
| 47 | if (filterModuleFunc != nullptr) |
| 48 | { |
| 49 | if (!filterModuleFunc(m)) continue; |
| 50 | } |
| 51 | |
| 52 | int id = ModuleManager::getInstance()->items.indexOf(m) + 1; |
| 53 | addItem(m->niceName, id); |
| 54 | } |
| 55 | |
| 56 | if (includeCVModule) |
| 57 | { |
| 58 | if (filterModuleFunc == nullptr || filterModuleFunc(CVGroupManager::getInstance()->module.get())) addItem("Custom Variables", 1000); |
| 59 | } |
| 60 | |
| 61 | setInterceptsMouseClicks(getNumItems() > 0, false); |
| 62 | //repaint(); |
| 63 | |
| 64 | chooserListeners.call(&ChooserListener::moduleListChanged, this); |
| 65 | } |
| 66 | |
| 67 | void ModuleChooserUI::setModuleSelected(Module * m, bool silent) |
| 68 | { |
no test coverage detected