Skip to content

Commit

Permalink
intagrated enumvalue IdentifyMode
Browse files Browse the repository at this point in the history
used like SingleEditMode here
  • Loading branch information
signedav authored and nyalldawson committed Feb 24, 2018
1 parent 940d204 commit 07e636f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/gui/qgsattributeform.cpp
Expand Up @@ -175,6 +175,10 @@ void QgsAttributeForm::setMode( QgsAttributeForm::Mode mode )
case QgsAttributeForm::AggregateSearchMode:
w->setMode( QgsAttributeFormWidget::AggregateSearchMode );
break;

case QgsAttributeForm::IdentifyMode:
w->setMode( QgsAttributeFormWidget::DefaultMode );
break;
}
}

Expand Down Expand Up @@ -211,6 +215,11 @@ void QgsAttributeForm::setMode( QgsAttributeForm::Mode mode )
mSearchButtonBox->setVisible( false );
hideButtonBox();
break;

case QgsAttributeForm::IdentifyMode:
setFeature( mFeature );
mSearchButtonBox->setVisible( false );
break;
}

emit modeChanged( mMode );
Expand All @@ -236,6 +245,7 @@ void QgsAttributeForm::setFeature( const QgsFeature &feature )
switch ( mMode )
{
case SingleEditMode:
case IdentifyMode:
case AddFeatureMode:
{
resetValues();
Expand Down Expand Up @@ -581,6 +591,7 @@ bool QgsAttributeForm::save()
switch ( mMode )
{
case SingleEditMode:
case IdentifyMode:
case MultiEditMode:
if ( !mDirty )
return true;
Expand All @@ -605,6 +616,7 @@ bool QgsAttributeForm::save()
switch ( mMode )
{
case SingleEditMode:
case IdentifyMode:
case AddFeatureMode:
case SearchMode:
case AggregateSearchMode:
Expand Down Expand Up @@ -692,6 +704,7 @@ void QgsAttributeForm::onAttributeChanged( const QVariant &value )
switch ( mMode )
{
case SingleEditMode:
case IdentifyMode:
case AddFeatureMode:
{
emit attributeChanged( eww->field().name(), value );
Expand Down Expand Up @@ -1876,6 +1889,7 @@ void QgsAttributeForm::layerSelectionChanged()
switch ( mMode )
{
case SingleEditMode:
case IdentifyMode:
case AddFeatureMode:
case SearchMode:
case AggregateSearchMode:
Expand Down

0 comments on commit 07e636f

Please sign in to comment.