Commit 70066832 authored by Dirk Wilden's avatar Dirk Wilden

saveObject selection fix (perhaps :) )

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@4099 383ad7c9-94d9-4d36-a494-682f7c89f535
parent bde1b658
......@@ -98,12 +98,10 @@ bool Core::saveObjectTo( int _id, QString _filename ) {
PluginFunctions::get_object(_id,object);
//init widget
static LoadWidget* widget = 0;
if ( !widget ){
widget = new LoadWidget(supportedTypes_);
connect(widget,SIGNAL(load(QString, DataType, int&)),this,SLOT(slotLoad(QString, DataType, int&)));
connect(widget,SIGNAL(save(int, QString)),this,SLOT(saveObject(int, QString)));
}
LoadWidget* widget = new LoadWidget(supportedTypes_);
connect(widget,SIGNAL(load(QString, DataType, int&)),this,SLOT(slotLoad(QString, DataType, int&)));
connect(widget,SIGNAL(save(int, QString)),this,SLOT(saveObject(int, QString)));
if (supportedTypes_.size() != 0)
return widget->showSave(_id,_filename);
......@@ -112,6 +110,8 @@ bool Core::saveObjectTo( int _id, QString _filename ) {
return false;
}
delete widget;
}else
return false;
}
......
......@@ -328,6 +328,7 @@ int LoadWidget::showSave(int _id, QString _filename){
//display correct path/name
QFileInfo fi(_filename);
QFile file(_filename);
if (file.exists()) {
setDirectory( fi.absolutePath() );
selectFile ( fi.fileName() );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment