Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix gui glitch in relation reference widget
  • Loading branch information
m-kuhn committed Jul 24, 2015
1 parent 20abb7d commit 6cccd21
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/gui/editorwidgets/qgsrelationreferencewidget.cpp
Expand Up @@ -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 );
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/gui/editorwidgets/qgsrelationreferencewidget.h
Expand Up @@ -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;
Expand Down

0 comments on commit 6cccd21

Please sign in to comment.