Skip to content

Commit 9f9ce32

Browse files
committedDec 27, 2012
Disable scale field if no symbology export
1 parent f3bb53f commit 9f9ce32

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed
 

‎src/app/ogr/qgsvectorlayersaveasdialog.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ QgsVectorLayerSaveAsDialog::QgsVectorLayerSaveAsDialog( long srsid, QWidget* par
6767
mSymbologyExportComboBox->addItem( tr( "No symbology" ), QgsVectorFileWriter::NoSymbology );
6868
mSymbologyExportComboBox->addItem( tr( "Feature symbology" ), QgsVectorFileWriter::FeatureSymbology );
6969
mSymbologyExportComboBox->addItem( tr( "Symbol layer symbology" ), QgsVectorFileWriter::SymbolLayerSymbology );
70+
on_mSymbologyExportComboBox_currentIndexChanged( mSymbologyExportComboBox->currentText() );
7071
}
7172

7273
QgsVectorLayerSaveAsDialog::~QgsVectorLayerSaveAsDialog()
@@ -205,3 +206,14 @@ double QgsVectorLayerSaveAsDialog::scaleDenominator() const
205206
{
206207
return mScaleSpinBox->value();
207208
}
209+
210+
void QgsVectorLayerSaveAsDialog::on_mSymbologyExportComboBox_currentIndexChanged( const QString& text )
211+
{
212+
bool scaleEnabled = true;
213+
if ( text == tr( "No symbology" ) )
214+
{
215+
scaleEnabled = false;
216+
}
217+
mScaleSpinBox->setEnabled( scaleEnabled );
218+
mScaleLabel->setEnabled( scaleEnabled );
219+
}

‎src/app/ogr/qgsvectorlayersaveasdialog.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ class QgsVectorLayerSaveAsDialog : public QDialog, private Ui::QgsVectorLayerSav
5454
void on_browseFilename_clicked();
5555
void on_browseCRS_clicked();
5656
void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }
57+
void on_mSymbologyExportComboBox_currentIndexChanged( const QString& text );
5758
void accept();
5859

5960
private:

0 commit comments

Comments
 (0)