Skip to content

Commit

Permalink
Fix checkbox status for auxiliary field
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Oct 9, 2017
1 parent 9fd80f9 commit 9cb3ff3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/gui/qgspropertyoverridebutton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -343,13 +343,13 @@ void QgsPropertyOverrideButton::aboutToShowMenu()

mActionCreateAuxiliaryField->setEnabled( true );
mActionCreateAuxiliaryField->setChecked( false );
if ( alayer && alayer->exists( mDefinition ) )

int index = mVectorLayer->fields().indexFromName( mFieldName );
int srcIndex;
if ( index >= 0 && alayer && mVectorLayer->isAuxiliaryField( index, srcIndex ) )
{
if ( mProperty.field() == QgsAuxiliaryLayer::nameFromProperty( mDefinition, true ) )
{
mActionCreateAuxiliaryField->setEnabled( false );
mActionCreateAuxiliaryField->setChecked( true );
}
mActionCreateAuxiliaryField->setEnabled( false );
mActionCreateAuxiliaryField->setChecked( true );
}
}

Expand Down

0 comments on commit 9cb3ff3

Please sign in to comment.