@@ -379,7 +379,7 @@ QgsProjectProperties::QgsProjectProperties( QgsMapCanvas* mapCanvas, QWidget *pa
379
379
QSignalMapper *smDelete = new QSignalMapper ( this );
380
380
connect ( smDelete, SIGNAL ( mapped ( int ) ), this , SLOT ( cbxWFSDeleteStateChanged ( int ) ) );
381
381
382
- twWFSLayers->setColumnCount ( 5 );
382
+ twWFSLayers->setColumnCount ( 6 );
383
383
twWFSLayers->horizontalHeader ()->setVisible ( true );
384
384
twWFSLayers->setRowCount ( mapLayers.size () );
385
385
@@ -405,14 +405,18 @@ QgsProjectProperties::QgsProjectProperties( QgsMapCanvas* mapCanvas, QWidget *pa
405
405
406
406
smPublied->setMapping ( cbp, j );
407
407
connect ( cbp, SIGNAL ( stateChanged ( int ) ), smPublied, SLOT ( map () ) );
408
+
409
+ QSpinBox* psb = new QSpinBox ();
410
+ psb->setValue ( QgsProject::instance ()->readNumEntry ( " WFSLayersPrecision" , " /" +currentLayer->id (), 8 ) );
411
+ twWFSLayers->setCellWidget ( j, 2 , psb );
408
412
409
413
QgsVectorLayer* vlayer = qobject_cast<QgsVectorLayer*>( currentLayer );
410
414
QgsVectorDataProvider* provider = vlayer->dataProvider ();
411
415
if (( provider->capabilities () & QgsVectorDataProvider::ChangeAttributeValues ) && ( provider->capabilities () & QgsVectorDataProvider::ChangeGeometries ) )
412
416
{
413
417
QCheckBox* cbu = new QCheckBox ();
414
418
cbu->setChecked ( wfstUpdateLayerIdList.contains ( currentLayer->id () ) );
415
- twWFSLayers->setCellWidget ( j, 2 , cbu );
419
+ twWFSLayers->setCellWidget ( j, 3 , cbu );
416
420
417
421
smUpdate->setMapping ( cbu, j );
418
422
connect ( cbu, SIGNAL ( stateChanged ( int ) ), smUpdate, SLOT ( map () ) );
@@ -421,7 +425,7 @@ QgsProjectProperties::QgsProjectProperties( QgsMapCanvas* mapCanvas, QWidget *pa
421
425
{
422
426
QCheckBox* cbi = new QCheckBox ();
423
427
cbi->setChecked ( wfstInsertLayerIdList.contains ( currentLayer->id () ) );
424
- twWFSLayers->setCellWidget ( j, 3 , cbi );
428
+ twWFSLayers->setCellWidget ( j, 4 , cbi );
425
429
426
430
smInsert->setMapping ( cbi, j );
427
431
connect ( cbi, SIGNAL ( stateChanged ( int ) ), smInsert, SLOT ( map () ) );
@@ -430,7 +434,7 @@ QgsProjectProperties::QgsProjectProperties( QgsMapCanvas* mapCanvas, QWidget *pa
430
434
{
431
435
QCheckBox* cbd = new QCheckBox ();
432
436
cbd->setChecked ( wfstDeleteLayerIdList.contains ( currentLayer->id () ) );
433
- twWFSLayers->setCellWidget ( j, 4 , cbd );
437
+ twWFSLayers->setCellWidget ( j, 5 , cbd );
434
438
435
439
smDelete->setMapping ( cbd, j );
436
440
connect ( cbd, SIGNAL ( stateChanged ( int ) ), smDelete, SLOT ( map () ) );
@@ -866,21 +870,25 @@ void QgsProjectProperties::apply()
866
870
if ( cb && cb->isChecked () )
867
871
{
868
872
wfsLayerList << id;
869
- }
870
- cb = qobject_cast<QCheckBox *>( twWFSLayers->cellWidget ( i, 2 ) );
871
- if ( cb && cb->isChecked () )
872
- {
873
- wfstUpdateLayerList << id;
874
- }
875
- cb = qobject_cast<QCheckBox *>( twWFSLayers->cellWidget ( i, 3 ) );
876
- if ( cb && cb->isChecked () )
877
- {
878
- wfstInsertLayerList << id;
879
- }
880
- cb = qobject_cast<QCheckBox *>( twWFSLayers->cellWidget ( i, 4 ) );
881
- if ( cb && cb->isChecked () )
882
- {
883
- wfstDeleteLayerList << id;
873
+
874
+ QSpinBox* sb = qobject_cast<QSpinBox *>( twWFSLayers->cellWidget ( i, 2 ) );
875
+ QgsProject::instance ()->writeEntry ( " WFSLayersPrecision" , " /" +id, sb->value () );
876
+
877
+ cb = qobject_cast<QCheckBox *>( twWFSLayers->cellWidget ( i, 3 ) );
878
+ if ( cb && cb->isChecked () )
879
+ {
880
+ wfstUpdateLayerList << id;
881
+ }
882
+ cb = qobject_cast<QCheckBox *>( twWFSLayers->cellWidget ( i, 4 ) );
883
+ if ( cb && cb->isChecked () )
884
+ {
885
+ wfstInsertLayerList << id;
886
+ }
887
+ cb = qobject_cast<QCheckBox *>( twWFSLayers->cellWidget ( i, 5 ) );
888
+ if ( cb && cb->isChecked () )
889
+ {
890
+ wfstDeleteLayerList << id;
891
+ }
884
892
}
885
893
}
886
894
QgsProject::instance ()->writeEntry ( " WFSLayers" , " /" , wfsLayerList );
0 commit comments