Skip to content

Commit 56f1c5f

Browse files
author
jef
committed
improve image format selecting in wms selection dialog
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13495 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent f67a049 commit 56f1c5f

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/app/qgswmssourceselect.cpp

+9-2
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ QgsWMSSourceSelect::QgsWMSSourceSelect( QWidget * parent, Qt::WFlags fl )
9696
mFormats << "image/png8"; // used by geoserver
9797
mLabels << "PNG8";
9898

99+
mFormats << "png"; // used by french IGN geoportail
100+
mLabels << "PNG";
101+
99102
mFormats << "pngt"; // used by french IGN geoportail
100103
mLabels << "PNGT";
101104
}
@@ -128,12 +131,14 @@ QgsWMSSourceSelect::QgsWMSSourceSelect( QWidget * parent, Qt::WFlags fl )
128131

129132
QRadioButton *btn = new QRadioButton( mLabels[i] );
130133
btn->setToolTip( mFormats[i] );
134+
btn->setHidden( true );
131135
mImageFormatGroup->addButton( btn, i );
132136
layout->addWidget( btn );
133137
}
134138

135139
// default to first encoding
136140
mImageFormatGroup->button( 0 )->setChecked( true );
141+
btnGrpImageEncoding->setDisabled( true );
137142

138143
layout->addStretch();
139144
btnGrpImageEncoding->setLayout( layout );
@@ -291,7 +296,7 @@ bool QgsWMSSourceSelect::populateLayerList( QgsWmsProvider *wmsProvider )
291296

292297
foreach( QAbstractButton *b, mImageFormatGroup->buttons() )
293298
{
294-
b->setEnabled( false );
299+
b->setHidden( true );
295300
}
296301

297302
foreach( QString encoding, wmsProvider->supportedImageEncodings() )
@@ -303,9 +308,11 @@ bool QgsWMSSourceSelect::populateLayerList( QgsWmsProvider *wmsProvider )
303308
continue;
304309
}
305310

306-
mImageFormatGroup->button( id )->setEnabled( true );
311+
mImageFormatGroup->button( id )->setVisible( true );
307312
}
308313

314+
btnGrpImageEncoding->setEnabled( true );
315+
309316
QMap<int, QgsNumericSortTreeWidgetItem *> items;
310317
QMap<int, int> layerParents;
311318
QMap<int, QStringList> layerParentNames;

0 commit comments

Comments
 (0)