Skip to content

Commit a6ceea9

Browse files
author
timlinux
committed
Wired in qprocess launch of mapserver export dialog
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5804 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 654f110 commit a6ceea9

File tree

1 file changed

+20
-15
lines changed

1 file changed

+20
-15
lines changed

src/gui/qgisapp.cpp

+20-15
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@
8787
#include "qgsmaplayerregistry.h"
8888
#include "qgsmapoverviewcanvas.h"
8989
#include "qgsmaprender.h"
90-
#include "qgsmapserverexport.h"
9190
#include "qgsmessageviewer.h"
9291
#include "qgsoptions.h"
9392
#include "qgspastetransformations.h"
@@ -3131,20 +3130,26 @@ void QgisApp::showAllLayers()
31313130
void QgisApp::exportMapServer()
31323131
{
31333132
// 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+
//}
31483153
}
31493154
void QgisApp::zoomIn()
31503155
{

0 commit comments

Comments
 (0)