Skip to content

Commit

Permalink
Fix reading of snapping dialog in dock state
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Oct 5, 2012
1 parent 705719c commit 51d97ff
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/app/qgssnappingdialog.cpp
Expand Up @@ -276,19 +276,6 @@ void QgsSnappingDialog::addLayer( QgsMapLayer * theMapLayer )
mLayerTreeWidget->setItemWidget( item, 5, cbxAvoidIntersection );
}

if ( myDockFlag )
{
connect( cbxEnable, SIGNAL( stateChanged( int ) ), this, SLOT( apply() ) );
connect( cbxSnapTo, SIGNAL( currentIndexChanged( int ) ), this, SLOT( apply() ) );
connect( leTolerance, SIGNAL( textEdited( const QString ) ), this, SLOT( apply() ) );
connect( cbxUnits, SIGNAL( currentIndexChanged( int ) ), this, SLOT( apply() ) );

if ( cbxAvoidIntersection )
{
connect( cbxAvoidIntersection, SIGNAL( stateChanged( int ) ), this, SLOT( apply() ) );
}
}

int idx = layerIdList.indexOf( currentVectorLayer->id() );
if ( idx < 0 )
{
Expand Down Expand Up @@ -318,6 +305,19 @@ void QgsSnappingDialog::addLayer( QgsMapLayer * theMapLayer )
{
cbxAvoidIntersection->setChecked( avoidIntersectionsList.contains( currentVectorLayer->id() ) );
}

if ( myDockFlag )
{
connect( cbxEnable, SIGNAL( stateChanged( int ) ), this, SLOT( apply() ) );
connect( cbxSnapTo, SIGNAL( currentIndexChanged( int ) ), this, SLOT( apply() ) );
connect( leTolerance, SIGNAL( textEdited( const QString ) ), this, SLOT( apply() ) );
connect( cbxUnits, SIGNAL( currentIndexChanged( int ) ), this, SLOT( apply() ) );

if ( cbxAvoidIntersection )
{
connect( cbxAvoidIntersection, SIGNAL( stateChanged( int ) ), this, SLOT( apply() ) );
}
}
}

void QgsSnappingDialog::layersWillBeRemoved( QStringList thelayers )
Expand Down

0 comments on commit 51d97ff

Please sign in to comment.