diff --git a/include/app/ModuleWidget.hpp b/include/app/ModuleWidget.hpp index ecfa6410..93830d01 100644 --- a/include/app/ModuleWidget.hpp +++ b/include/app/ModuleWidget.hpp @@ -38,11 +38,11 @@ struct ModuleWidget : widget::OpaqueWidget { */ void setModule(engine::Module* module); + widget::Widget* getPanel(); /** Sets the panel and sets the size of the ModuleWidget from the panel. Transfers ownership. */ void setPanel(widget::Widget* panel); - /** Use `setPanel(createPanel(svg))` instead. */ void setPanel(std::shared_ptr svg); /** Convenience functions for adding special widgets. diff --git a/src/app/ModuleWidget.cpp b/src/app/ModuleWidget.cpp index bf7a061a..365643c0 100644 --- a/src/app/ModuleWidget.cpp +++ b/src/app/ModuleWidget.cpp @@ -81,6 +81,10 @@ void ModuleWidget::setModule(engine::Module* module) { this->module = module; } +widget::Widget* ModuleWidget::getPanel() { + return internal->panel; +} + void ModuleWidget::setPanel(widget::Widget* panel) { // Remove existing panel if (internal->panel) {