mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
[composer] Enable always disabled labels as outline checkbox in
svg export, hook up to labeling setting
This commit is contained in:
parent
4bc606c854
commit
aedf08c8a4
@ -2303,6 +2303,7 @@ void QgsComposer::exportCompositionAsSVG( QgsComposer::OutputMode mode )
|
||||
QString outputFileName;
|
||||
QString outputDir;
|
||||
bool groupLayers = false;
|
||||
bool prevSettingLabelsAsOutlines = QgsProject::instance()->readBoolEntry( "PAL", "/DrawOutlineLabels", true );
|
||||
|
||||
if ( mode == QgsComposer::Single )
|
||||
{
|
||||
@ -2333,8 +2334,12 @@ void QgsComposer::exportCompositionAsSVG( QgsComposer::OutputMode mode )
|
||||
QDialog dialog;
|
||||
Ui::QgsSvgExportOptionsDialog options;
|
||||
options.setupUi( &dialog );
|
||||
options.chkTextAsOutline->setChecked( prevSettingLabelsAsOutlines );
|
||||
|
||||
dialog.exec();
|
||||
groupLayers = options.chkMapLayersAsGroup->isChecked();
|
||||
//temporarily override label draw outlines setting
|
||||
QgsProject::instance()->writeEntry( "PAL", "/DrawOutlineLabels", options.chkTextAsOutline->isChecked() );
|
||||
}
|
||||
|
||||
if ( !outputFileName.endsWith( ".svg", Qt::CaseInsensitive ) )
|
||||
@ -2388,8 +2393,12 @@ void QgsComposer::exportCompositionAsSVG( QgsComposer::OutputMode mode )
|
||||
QDialog dialog;
|
||||
Ui::QgsSvgExportOptionsDialog options;
|
||||
options.setupUi( &dialog );
|
||||
options.chkTextAsOutline->setChecked( prevSettingLabelsAsOutlines );
|
||||
|
||||
dialog.exec();
|
||||
groupLayers = options.chkMapLayersAsGroup->isChecked();
|
||||
//temporarily override label draw outlines setting
|
||||
QgsProject::instance()->writeEntry( "PAL", "/DrawOutlineLabels", options.chkTextAsOutline->isChecked() );
|
||||
}
|
||||
|
||||
|
||||
@ -2409,6 +2418,7 @@ void QgsComposer::exportCompositionAsSVG( QgsComposer::OutputMode mode )
|
||||
QMessageBox::Ok,
|
||||
QMessageBox::Ok );
|
||||
mView->setPaintingEnabled( true );
|
||||
QgsProject::instance()->writeEntry( "PAL", "/DrawOutlineLabels", prevSettingLabelsAsOutlines );
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -2437,6 +2447,7 @@ void QgsComposer::exportCompositionAsSVG( QgsComposer::OutputMode mode )
|
||||
QMessageBox::Ok,
|
||||
QMessageBox::Ok );
|
||||
mView->setPaintingEnabled( true );
|
||||
QgsProject::instance()->writeEntry( "PAL", "/DrawOutlineLabels", prevSettingLabelsAsOutlines );
|
||||
return;
|
||||
}
|
||||
outputFileName = QDir( outputDir ).filePath( atlasMap->currentFilename() ) + ".svg";
|
||||
@ -2481,6 +2492,7 @@ void QgsComposer::exportCompositionAsSVG( QgsComposer::OutputMode mode )
|
||||
QMessageBox::Ok,
|
||||
QMessageBox::Ok );
|
||||
mView->setPaintingEnabled( true );
|
||||
QgsProject::instance()->writeEntry( "PAL", "/DrawOutlineLabels", prevSettingLabelsAsOutlines );
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2604,6 +2616,7 @@ void QgsComposer::exportCompositionAsSVG( QgsComposer::OutputMode mode )
|
||||
QMessageBox::Ok,
|
||||
QMessageBox::Ok );
|
||||
mView->setPaintingEnabled( true );
|
||||
QgsProject::instance()->writeEntry( "PAL", "/DrawOutlineLabels", prevSettingLabelsAsOutlines );
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2618,6 +2631,7 @@ void QgsComposer::exportCompositionAsSVG( QgsComposer::OutputMode mode )
|
||||
atlasMap->endRender();
|
||||
|
||||
mView->setPaintingEnabled( true );
|
||||
QgsProject::instance()->writeEntry( "PAL", "/DrawOutlineLabels", prevSettingLabelsAsOutlines );
|
||||
}
|
||||
|
||||
void QgsComposer::on_mActionSelectMoveItem_triggered()
|
||||
|
@ -6,7 +6,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>463</width>
|
||||
<width>471</width>
|
||||
<height>103</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -29,10 +29,13 @@
|
||||
<item>
|
||||
<widget class="QCheckBox" name="chkTextAsOutline">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Uncheck to render map labels as text objects. This will degrade the quality of the map labels but allow editing in vector illustration software.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Render text as outline</string>
|
||||
<string>Render map labels as outlines</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
Loading…
x
Reference in New Issue
Block a user