Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] authored and nirvn committed Jan 23, 2025
1 parent 8fee42d commit fd67cd1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/gui/vector/qgsattributesformproperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ void QgsAttributesFormProperties::loadAttributeSpecificEditor( QgsAttributesDnDT
if ( layout == Qgis::AttributeFormLayout::DragAndDrop )
{
loadAttributeWidgetEdit();
}
}
loadAttributeTypeDialog();
break;
}
Expand Down
2 changes: 1 addition & 1 deletion src/gui/vector/qgsattributesformproperties.h
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ class GUI_EXPORT QgsAttributesFormProperties : public QWidget, public QgsExpress
QMenu *mAvailableWidgetsTreeContextMenu = nullptr;
QAction *mActionCopyWidgetConfiguration = nullptr;
QAction *mActionPasteWidgetConfiguration = nullptr;

friend class TestQgsAttributesFormProperties;
};

Expand Down
8 changes: 4 additions & 4 deletions tests/src/gui/testqgsattributesformproperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,22 +61,22 @@ void TestQgsAttributesFormProperties::testConfigStored()
QgsVectorLayer *layer = new QgsVectorLayer( QStringLiteral( "Point?field=col0:integer&field=col1:integer" ), QStringLiteral( "test" ), QStringLiteral( "memory" ) );
QgsAttributesFormProperties attributeFormProperties( layer );
attributeFormProperties.init();
// Get the fields

// Get the fields
QVERIFY( attributeFormProperties.mAvailableWidgetsTree );
QTreeWidgetItem *fieldsItem = attributeFormProperties.mAvailableWidgetsTree->topLevelItem( 0 );
QVERIFY( fieldsItem );
QCOMPARE( fieldsItem->text( 0 ), QStringLiteral( "Fields" ) );
QCOMPARE( fieldsItem->childCount(), 2 );

// Insure that the configuration was stored when switching from one available widgets tree item to another
attributeFormProperties.mAvailableWidgetsTree->setCurrentItem( fieldsItem->child( 0 ) );
QVERIFY( attributeFormProperties.mAttributeTypeDialog );
attributeFormProperties.mAttributeTypeDialog->setAlias( QStringLiteral( "alias0" ) );
attributeFormProperties.mAvailableWidgetsTree->setCurrentItem( fieldsItem->child( 1 ) );
QVERIFY( attributeFormProperties.mAttributeTypeDialog );
attributeFormProperties.mAttributeTypeDialog->setAlias( QStringLiteral( "alias1" ) );

attributeFormProperties.mAvailableWidgetsTree->setCurrentItem( fieldsItem->child( 0 ) );
QVERIFY( attributeFormProperties.mAttributeTypeDialog );
QCOMPARE( attributeFormProperties.mAttributeTypeDialog->alias(), QStringLiteral( "alias0" ) );
Expand Down

0 comments on commit fd67cd1

Please sign in to comment.