diff --git a/src/gui/vector/qgsattributesformproperties.cpp b/src/gui/vector/qgsattributesformproperties.cpp index e07b0ede9825..8eb641dd3cfc 100644 --- a/src/gui/vector/qgsattributesformproperties.cpp +++ b/src/gui/vector/qgsattributesformproperties.cpp @@ -615,8 +615,13 @@ void QgsAttributesFormProperties::loadAttributeSpecificEditor( QgsAttributesDnDT if ( layout == Qgis::AttributeFormLayout::DragAndDrop ) storeAttributeWidgetEdit(); - storeAttributeTypeDialog(); - storeAttributeContainerEdit(); + + // Do not store while initializing! + if ( !mAvailableWidgetsTree->selectedItems().empty() ) + { + storeAttributeTypeDialog(); + storeAttributeContainerEdit(); + } clearAttributeTypeFrame();