mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Make sure a widget is initialized when creating a widget wrapper
Fix #10357
This commit is contained in:
parent
644dd13c3a
commit
37c1cad11a
@ -44,10 +44,14 @@ QgsEditorWidgetWrapper* QgsEditorWidgetRegistry::create( const QString& widgetId
|
||||
if ( mWidgetFactories.contains( widgetId ) )
|
||||
{
|
||||
QgsEditorWidgetWrapper* ww = mWidgetFactories[widgetId]->create( vl, fieldIdx, editor, parent );
|
||||
|
||||
if ( ww )
|
||||
{
|
||||
ww->setConfig( config );
|
||||
ww->setContext( context );
|
||||
// Make sure that there is a widget created at this point
|
||||
// so setValue() et al won't crash
|
||||
ww->widget();
|
||||
return ww;
|
||||
}
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ const QgsEditorWidgetConfig QgsWidgetWrapper::config()
|
||||
return mConfig;
|
||||
}
|
||||
|
||||
const QgsAttributeEditorContext&QgsWidgetWrapper::context()
|
||||
const QgsAttributeEditorContext& QgsWidgetWrapper::context()
|
||||
{
|
||||
return mContext;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user