Skip to content

Commit 347d048

Browse files
authoredMay 1, 2020
remove relation editor on double clik in form editor (#36123)
there is now the panel on the right for this
1 parent dd560f4 commit 347d048

File tree

1 file changed

+1
-39
lines changed

1 file changed

+1
-39
lines changed
 

‎src/gui/vector/qgsattributesformproperties.cpp

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,46 +1182,8 @@ void QgsAttributesDnDTree::onItemDoubleClicked( QTreeWidgetItem *item, int colum
11821182
{
11831183
case QgsAttributesFormProperties::DnDTreeItemData::Container:
11841184
case QgsAttributesFormProperties::DnDTreeItemData::WidgetType:
1185-
break;
1186-
11871185
case QgsAttributesFormProperties::DnDTreeItemData::Relation:
1188-
{
1189-
QDialog dlg;
1190-
dlg.setWindowTitle( tr( "Configure Relation Editor" ) );
1191-
QFormLayout *layout = new QFormLayout() ;
1192-
dlg.setLayout( layout );
1193-
layout->addWidget( baseWidget );
1194-
1195-
QCheckBox *showLinkButton = new QCheckBox( tr( "Show link button" ) );
1196-
showLinkButton->setChecked( itemData.relationEditorConfiguration().showLinkButton );
1197-
QCheckBox *showUnlinkButton = new QCheckBox( tr( "Show unlink button" ) );
1198-
showUnlinkButton->setChecked( itemData.relationEditorConfiguration().showUnlinkButton );
1199-
QCheckBox *showSaveChildEditsButton = new QCheckBox( tr( "Show save child layer edits button" ) );
1200-
showSaveChildEditsButton->setChecked( itemData.relationEditorConfiguration().showSaveChildEditsButton );
1201-
layout->addRow( showLinkButton );
1202-
layout->addRow( showUnlinkButton );
1203-
layout->addRow( showSaveChildEditsButton );
1204-
1205-
QDialogButtonBox *buttonBox = new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Cancel );
1206-
1207-
connect( buttonBox, &QDialogButtonBox::accepted, &dlg, &QDialog::accept );
1208-
connect( buttonBox, &QDialogButtonBox::rejected, &dlg, &QDialog::reject );
1209-
1210-
dlg.layout()->addWidget( buttonBox );
1211-
1212-
if ( dlg.exec() )
1213-
{
1214-
QgsAttributesFormProperties::RelationEditorConfiguration relEdCfg;
1215-
relEdCfg.showLinkButton = showLinkButton->isChecked();
1216-
relEdCfg.showUnlinkButton = showUnlinkButton->isChecked();
1217-
relEdCfg.showSaveChildEditsButton = showSaveChildEditsButton->isChecked();
1218-
itemData.setShowLabel( showLabelCheckbox->isChecked() );
1219-
itemData.setRelationEditorConfiguration( relEdCfg );
1220-
1221-
item->setData( 0, QgsAttributesFormProperties::DnDTreeRole, itemData );
1222-
}
1223-
}
1224-
break;
1186+
break;
12251187

12261188
case QgsAttributesFormProperties::DnDTreeItemData::QmlWidget:
12271189
{

0 commit comments

Comments
 (0)
Please sign in to comment.