Skip to content
Permalink
Browse files

Fix gui glitch in relation reference widget

  • Loading branch information
m-kuhn committed Jul 24, 2015
1 parent 20abb7d commit 6cccd21738f498280c36ae1565469166e1d2c779
@@ -91,20 +91,20 @@ QgsRelationReferenceWidget::QgsRelationReferenceWidget( QWidget* parent )
editLayout->setSpacing( 2 );

// Prepare the container and layout for the filter comboboxes
mChooserGroupBox = new QGroupBox( this );
editLayout->addWidget( mChooserGroupBox );
mChooserContainer = new QWidget;
editLayout->addWidget( mChooserContainer );
QHBoxLayout* chooserLayout = new QHBoxLayout;
chooserLayout->setContentsMargins( 0, 0, 0, 0 );
mFilterLayout = new QHBoxLayout;
mFilterLayout->setContentsMargins( 0, 0, 0, 0 );
mFilterContainer = new QWidget;
mFilterContainer->setLayout( mFilterLayout );
mChooserGroupBox->setLayout( chooserLayout );
mChooserContainer->setLayout( chooserLayout );
chooserLayout->addWidget( mFilterContainer );

// combobox (for non-geometric relation)
mComboBox = new QComboBox( this );
mChooserGroupBox->layout()->addWidget( mComboBox );
mChooserContainer->layout()->addWidget( mComboBox );

// read-only line edit
mLineEdit = new QLineEdit( this );
@@ -390,7 +390,7 @@ void QgsRelationReferenceWidget::setEmbedForm( bool display )

void QgsRelationReferenceWidget::setReadOnlySelector( bool readOnly )
{
mChooserGroupBox->setHidden( readOnly );
mChooserContainer->setHidden( readOnly );
mLineEdit->setVisible( readOnly );
mRemoveFKButton->setVisible( mAllowNull && readOnly );
mReadOnlySelector = readOnly;
@@ -184,7 +184,7 @@ class GUI_EXPORT QgsRelationReferenceWidget : public QWidget
QAction* mScaleHighlightFeatureAction;
QAction* mPanHighlightFeatureAction;
QComboBox* mComboBox;
QGroupBox* mChooserGroupBox;
QWidget* mChooserContainer;
QWidget* mFilterContainer;
QHBoxLayout* mFilterLayout;
QgsCollapsibleGroupBox* mAttributeEditorFrame;

0 comments on commit 6cccd21

Please sign in to comment.
You can’t perform that action at this time.