[QGIS Commit] r9114 - trunk/qgis/src/plugins/dxf2shp_converter

svn_qgis at osgeo.org svn_qgis at osgeo.org
Thu Aug 21 18:50:22 EDT 2008


Author: jef
Date: 2008-08-21 18:50:22 -0400 (Thu, 21 Aug 2008)
New Revision: 9114

Modified:
   trunk/qgis/src/plugins/dxf2shp_converter/dxf2shpconverter.cpp
   trunk/qgis/src/plugins/dxf2shp_converter/dxf2shpconvertergui.cpp
Log:
fix #1234 & #1235

Modified: trunk/qgis/src/plugins/dxf2shp_converter/dxf2shpconverter.cpp
===================================================================
--- trunk/qgis/src/plugins/dxf2shp_converter/dxf2shpconverter.cpp	2008-08-21 22:38:50 UTC (rev 9113)
+++ trunk/qgis/src/plugins/dxf2shp_converter/dxf2shpconverter.cpp	2008-08-21 22:50:22 UTC (rev 9114)
@@ -92,12 +92,11 @@
 // not be enough
 void dxf2shpConverter::run()
 {
-  dxf2shpConverterGui *myPluginGui = new dxf2shpConverterGui(mQGisIface
-    ->getMainWindow(), QgisGui::ModalDialogFlags);
+  dxf2shpConverterGui *myPluginGui =
+    new dxf2shpConverterGui(mQGisIface->getMainWindow(), QgisGui::ModalDialogFlags);
   myPluginGui->setAttribute(Qt::WA_DeleteOnClose);
 
-  connect(myPluginGui, SIGNAL(createLayer(QString)), this, SLOT(addMyLayer
-    (QString)));
+  connect(myPluginGui, SIGNAL(createLayer(QString)), this, SLOT(addMyLayer(QString)));
 
   myPluginGui->show();
 }
@@ -113,14 +112,7 @@
 
 void dxf2shpConverter::addMyLayer(QString myfname)
 {
-  // need to get a pointer to the current layer
-  mQString = myfname;
-
-  QgsMapLayer *layer = mQGisIface->activeLayer();
-  if (layer)
-    QgsVectorLayer *lyr = (QgsVectorLayer*)layer;
-
-  mQGisIface->addVectorLayer(mQString, "Converted_Layer", "ogr");
+  mQGisIface->addVectorLayer(myfname, "Converted_Layer", "ogr");
 }
 
 //////////////////////////////////////////////////////////////////////////

Modified: trunk/qgis/src/plugins/dxf2shp_converter/dxf2shpconvertergui.cpp
===================================================================
--- trunk/qgis/src/plugins/dxf2shp_converter/dxf2shpconvertergui.cpp	2008-08-21 22:38:50 UTC (rev 9113)
+++ trunk/qgis/src/plugins/dxf2shp_converter/dxf2shpconvertergui.cpp	2008-08-21 22:50:22 UTC (rev 9114)
@@ -126,15 +126,15 @@
 void dxf2shpConverterGui::on_buttonBox_helpRequested()
 {
   QString s = "Fields description:\n"
-  "* Input DXF file: path to the DXF file to be converted\n"; 
-  "* Output Shp file: desired filename of the ShapeFile to be created\n";
-  "* Shp output file type: specifies the type of the output shapefile\n";
-  "* Export text labels checkbox: if checked, an additional shp points layer will be created, ";
-  "  and the associated dbf table will contain informations about the \"TEXT\" fields found";
-   " in the dxf file, and the text strings themselves\n\n";
-  "---\n";
-  "Developed by Paolo L. Scala, Barbara Rita Barricelli, Marco Padula\n";
-  "CNR, Milan Unit (Information Technology), Construction Technologies Institute.\n";
+  "* Input DXF file: path to the DXF file to be converted\n" 
+  "* Output Shp file: desired filename of the ShapeFile to be created\n"
+  "* Shp output file type: specifies the type of the output shapefile\n"
+  "* Export text labels checkbox: if checked, an additional shp points layer will be created, "
+  "  and the associated dbf table will contain informations about the \"TEXT\" fields found"
+   " in the dxf file, and the text strings themselves\n\n"
+  "---\n"
+  "Developed by Paolo L. Scala, Barbara Rita Barricelli, Marco Padula\n"
+  "CNR, Milan Unit (Information Technology), Construction Technologies Institute.\n"
   "For support send a mail to scala at itc.cnr.it\n";
 
   QMessageBox::information(this, "Help", s);



More information about the QGIS-commit mailing list