Skip to content
Permalink
Browse files

Merge pull request #505 from vinayan/7477-add-rule-crash

 [FIX #7477] Topology Checker - Crash as soon a layer is choosen when defining a rule
  • Loading branch information
mach0 committed Apr 8, 2013
2 parents 34adbe7 + 52da723 commit 51fc960b42223d11dba6f8c4c0cb527dd83f7f7a
@@ -59,15 +59,13 @@ checkDock::checkDock( QgisInterface* qIface, QWidget* parent )
mErrorTableView->verticalHeader()->setDefaultSectionSize( 20 );

mLayerRegistry = QgsMapLayerRegistry::instance();
mConfigureDialog = new rulesDialog( mLayerRegistry->mapLayers().keys(), mTest->testMap(), qIface, parent );
mTestTable = mConfigureDialog->testTable();
mConfigureDialog = new rulesDialog( mTest->testMap(), qIface, parent );
mTestTable = mConfigureDialog->rulesTable();

mValidateExtentButton->setIcon( QIcon( ":/topology/validateExtent.png" ) );
mValidateAllButton->setIcon( QIcon( ":/topology/validateAll.png" ) );
mConfigureButton->setIcon( QIcon( ":/topology/configureRules.png" ) );


// mQgisApp = QgisApp::instance();
QgsMapCanvas* canvas = qIface->mapCanvas();// mQgisApp->mapCanvas();
mRBFeature1 = new QgsRubberBand( canvas );
mRBFeature2 = new QgsRubberBand( canvas );
@@ -94,11 +92,12 @@ checkDock::checkDock( QgisInterface* qIface, QWidget* parent )
connect( mFixButton, SIGNAL( clicked() ), this, SLOT( fix() ) );
connect( mErrorTableView, SIGNAL( clicked( const QModelIndex & ) ), this, SLOT( errorListClicked( const QModelIndex & ) ) );

connect( mLayerRegistry, SIGNAL( layerWasAdded( QgsMapLayer* ) ), mConfigureDialog, SLOT( addLayer( QgsMapLayer* ) ) );
connect( mLayerRegistry, SIGNAL( layerWillBeRemoved( QString ) ), mConfigureDialog, SLOT( removeLayer( QString ) ) );
connect( mLayerRegistry, SIGNAL( layerWillBeRemoved( QString ) ), this, SLOT( parseErrorListByLayer( QString ) ) );

connect( this, SIGNAL( visibilityChanged( bool ) ), this, SLOT( updateRubberBands( bool ) ) );
connect( qgsInterface, SIGNAL( newProjectCreated() ), mConfigureDialog, SLOT( clearRules() ) );
connect( qgsInterface, SIGNAL( newProjectCreated() ), this, SLOT( deleteErrors() ) );

}

checkDock::~checkDock()
@@ -204,6 +203,7 @@ void checkDock::parseErrorListByFeature( int featureId )

void checkDock::configure()
{
mConfigureDialog->initGui();
mConfigureDialog->show();
}

0 comments on commit 51fc960

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