Skip to content

Commit 4d9ba4f

Browse files
author
jef
committed
fix #1234 & #1235
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9114 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 3da81a9 commit 4d9ba4f

File tree

2 files changed

+13
-21
lines changed

2 files changed

+13
-21
lines changed

src/plugins/dxf2shp_converter/dxf2shpconverter.cpp

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,11 @@ void dxf2shpConverter::help()
9292
// not be enough
9393
void dxf2shpConverter::run()
9494
{
95-
dxf2shpConverterGui *myPluginGui = new dxf2shpConverterGui(mQGisIface
96-
->getMainWindow(), QgisGui::ModalDialogFlags);
95+
dxf2shpConverterGui *myPluginGui =
96+
new dxf2shpConverterGui(mQGisIface->getMainWindow(), QgisGui::ModalDialogFlags);
9797
myPluginGui->setAttribute(Qt::WA_DeleteOnClose);
9898

99-
connect(myPluginGui, SIGNAL(createLayer(QString)), this, SLOT(addMyLayer
100-
(QString)));
99+
connect(myPluginGui, SIGNAL(createLayer(QString)), this, SLOT(addMyLayer(QString)));
101100

102101
myPluginGui->show();
103102
}
@@ -113,14 +112,7 @@ void dxf2shpConverter::unload()
113112

114113
void dxf2shpConverter::addMyLayer(QString myfname)
115114
{
116-
// need to get a pointer to the current layer
117-
mQString = myfname;
118-
119-
QgsMapLayer *layer = mQGisIface->activeLayer();
120-
if (layer)
121-
QgsVectorLayer *lyr = (QgsVectorLayer*)layer;
122-
123-
mQGisIface->addVectorLayer(mQString, "Converted_Layer", "ogr");
115+
mQGisIface->addVectorLayer(myfname, "Converted_Layer", "ogr");
124116
}
125117

126118
//////////////////////////////////////////////////////////////////////////

src/plugins/dxf2shp_converter/dxf2shpconvertergui.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -126,15 +126,15 @@ void dxf2shpConverterGui::on_buttonBox_rejected()
126126
void dxf2shpConverterGui::on_buttonBox_helpRequested()
127127
{
128128
QString s = "Fields description:\n"
129-
"* Input DXF file: path to the DXF file to be converted\n";
130-
"* Output Shp file: desired filename of the ShapeFile to be created\n";
131-
"* Shp output file type: specifies the type of the output shapefile\n";
132-
"* Export text labels checkbox: if checked, an additional shp points layer will be created, ";
133-
" and the associated dbf table will contain informations about the \"TEXT\" fields found";
134-
" in the dxf file, and the text strings themselves\n\n";
135-
"---\n";
136-
"Developed by Paolo L. Scala, Barbara Rita Barricelli, Marco Padula\n";
137-
"CNR, Milan Unit (Information Technology), Construction Technologies Institute.\n";
129+
"* Input DXF file: path to the DXF file to be converted\n"
130+
"* Output Shp file: desired filename of the ShapeFile to be created\n"
131+
"* Shp output file type: specifies the type of the output shapefile\n"
132+
"* Export text labels checkbox: if checked, an additional shp points layer will be created, "
133+
" and the associated dbf table will contain informations about the \"TEXT\" fields found"
134+
" in the dxf file, and the text strings themselves\n\n"
135+
"---\n"
136+
"Developed by Paolo L. Scala, Barbara Rita Barricelli, Marco Padula\n"
137+
"CNR, Milan Unit (Information Technology), Construction Technologies Institute.\n"
138138
"For support send a mail to scala@itc.cnr.it\n";
139139

140140
QMessageBox::information(this, "Help", s);

0 commit comments

Comments
 (0)