|
87 | 87 | #include "qgsmaplayerregistry.h"
|
88 | 88 | #include "qgsmapoverviewcanvas.h"
|
89 | 89 | #include "qgsmaprender.h"
|
90 |
| -#include "qgsmapserverexport.h" |
91 | 90 | #include "qgsmessageviewer.h"
|
92 | 91 | #include "qgsoptions.h"
|
93 | 92 | #include "qgspastetransformations.h"
|
@@ -3131,20 +3130,26 @@ void QgisApp::showAllLayers()
|
3131 | 3130 | void QgisApp::exportMapServer()
|
3132 | 3131 | {
|
3133 | 3132 | // check to see if there are any layers to export
|
3134 |
| - if (mMapCanvas->layerCount() > 0) |
3135 |
| - { |
3136 |
| - QgsMapserverExport *mse = new QgsMapserverExport(mMapCanvas, this); |
3137 |
| - if (mse->exec()) |
3138 |
| - { |
3139 |
| - mse->write(); |
3140 |
| - } |
3141 |
| - delete mse; |
3142 |
| - } |
3143 |
| - else |
3144 |
| - { |
3145 |
| - QMessageBox::warning(this, tr("No Map Layers"), |
3146 |
| - tr("No layers to export. You must add at least one layer to the map in order to export the view.")); |
3147 |
| - } |
| 3133 | + // Possibly we may reinstate this in the future if we provide 'active project' export again |
| 3134 | + //if (mMapCanvas->layerCount() > 0) |
| 3135 | + //{ |
| 3136 | + QString myMSExportPath = QgsApplication::msexportAppPath(); |
| 3137 | + QProcess *process = new QProcess; |
| 3138 | + process->start(myMSExportPath); |
| 3139 | + |
| 3140 | + // Delete this object if the process terminates |
| 3141 | + connect(process, SIGNAL(finished(int, QProcess::ExitStatus)), |
| 3142 | + SLOT(processExited())); |
| 3143 | + |
| 3144 | + // Delete the process if the application quits |
| 3145 | + connect(qApp, SIGNAL(aboutToQuit()), process, SLOT(terminate())); |
| 3146 | + |
| 3147 | + //} |
| 3148 | + //else |
| 3149 | + //{ |
| 3150 | + // QMessageBox::warning(this, tr("No Map Layers"), |
| 3151 | + // tr("No layers to export. You must add at least one layer to the map in order to export the view.")); |
| 3152 | + //} |
3148 | 3153 | }
|
3149 | 3154 | void QgisApp::zoomIn()
|
3150 | 3155 | {
|
|
0 commit comments