From 4a3d31271be41bff510b9702c2e77c2fea5b99bd Mon Sep 17 00:00:00 2001 From: nds Date: Tue, 29 Mar 2016 14:24:51 +0300 Subject: [PATCH] Issue #1368: Creation of a Qt panel. Widget creator interface correction to manage Qt panel type. --- src/ModuleBase/ModuleBase_WidgetFactory.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ModuleBase/ModuleBase_WidgetFactory.cpp b/src/ModuleBase/ModuleBase_WidgetFactory.cpp index e81766962..165aa750f 100644 --- a/src/ModuleBase/ModuleBase_WidgetFactory.cpp +++ b/src/ModuleBase/ModuleBase_WidgetFactory.cpp @@ -74,8 +74,10 @@ void ModuleBase_WidgetFactory::createWidget(ModuleBase_PageBase* thePage) std::string aWType = myWidgetApi->widgetType(); if (aWType == NODE_FEATURE) { QWidget* aPanel = createPanel(thePage->pageWidget()); - thePage->addWidget(aPanel); - return; + if (aPanel) { + thePage->addWidget(aPanel); + return; + } } if (!myWidgetApi->toChildWidget()) -- 2.39.2