Skip to content
Permalink
Browse files

compare pointers

  • Loading branch information
signedav committed Sep 18, 2018
1 parent 8766216 commit dcca3483735abe17b3b01937d67ed8bf5f93bd0f
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/gui/editorwidgets/qgsrelationwidgetwrapper.cpp
@@ -47,15 +47,15 @@ void QgsRelationWidgetWrapper::setVisible( bool visible )

void QgsRelationWidgetWrapper::aboutToSave()
{
if ( !mRelation.isValid() || !widget() || !widget()->isVisible() || mRelation.referencingLayer()->name() == mRelation.referencedLayer()->name() )
if ( !mRelation.isValid() || !widget() || !widget()->isVisible() || mRelation.referencingLayer() == mRelation.referencedLayer() )
return;

// If the layer is already saved before, return
const QgsAttributeEditorContext *ctx = &context();
do
{
if ( ctx->relation().isValid() && ( ctx->relation().referencedLayer()->name() == mRelation.referencingLayer()->name()
|| ( mNmRelation.isValid() && ctx->relation().referencedLayer()->name() == mNmRelation.referencedLayer()->name() ) )
if ( ctx->relation().isValid() && ( ctx->relation().referencedLayer() == mRelation.referencingLayer()
|| ( mNmRelation.isValid() && ctx->relation().referencedLayer() == mNmRelation.referencedLayer() ) )
)
{
return;

0 comments on commit dcca348

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