Skip to content

Commit

Permalink
fix #1234 & #1235
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9114 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Aug 21, 2008
1 parent 3da81a9 commit 4d9ba4f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 21 deletions.
16 changes: 4 additions & 12 deletions src/plugins/dxf2shp_converter/dxf2shpconverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,11 @@ void dxf2shpConverter::help()
// 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();
}
Expand All @@ -113,14 +112,7 @@ void dxf2shpConverter::unload()

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");
}

//////////////////////////////////////////////////////////////////////////
Expand Down
18 changes: 9 additions & 9 deletions src/plugins/dxf2shp_converter/dxf2shpconvertergui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,15 @@ void dxf2shpConverterGui::on_buttonBox_rejected()
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@itc.cnr.it\n";

QMessageBox::information(this, "Help", s);
Expand Down

0 comments on commit 4d9ba4f

Please sign in to comment.