Skip to content

Commit

Permalink
relation reference: correctly initialize and set properties for widget
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Aug 20, 2014
1 parent eb678e4 commit dbf2834
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/gui/editorwidgets/qgsrelationreferencewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ QgsRelationReferenceWidget::QgsRelationReferenceWidget( QWidget* parent )
// default mode is combobox, non geometric relation and no embed form
mLineEdit->hide();
mMapIdentificationButton->hide();
mAttributeEditorFrame->hide();
}

QgsRelationReferenceWidget::~QgsRelationReferenceWidget()
Expand Down Expand Up @@ -236,18 +237,21 @@ void QgsRelationReferenceWidget::setEditorContext( QgsAttributeEditorContext con
void QgsRelationReferenceWidget::setEmbedForm( bool display )
{
mAttributeEditorFrame->setVisible( display );
mEmbedForm = display;
}

void QgsRelationReferenceWidget::setReadOnlySelector( bool readOnly )
{
mComboBox->setHidden( readOnly );
mLineEdit->setVisible( readOnly );
mReadOnlySelector = readOnly;
}

void QgsRelationReferenceWidget::setAllowMapIdentification( bool allowMapIdentification )
{
mHighlightFeatureButton->setVisible( allowMapIdentification );
mMapIdentificationButton->setVisible( allowMapIdentification );
mAllowMapIdentification = allowMapIdentification;
}

void QgsRelationReferenceWidget::highlightActionTriggered( QAction* action )
Expand Down

0 comments on commit dbf2834

Please sign in to comment.