Commit 8630f2d9 authored by Matthias Möller's avatar Matthias Möller
Browse files

- use function "BaseObject::setFromFilename" instead of using methods seperated

refs #670

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@14539 383ad7c9-94d9-4d36-a494-682f7c89f535
parent b401df72
......@@ -214,8 +214,7 @@ int FileSKLPlugin::loadObject(QString _filename)
//general stuff
obj->source( PluginFunctions::objectCount() > 4 );
QFileInfo info(_filename);
obj->setName(info.fileName());
obj->setFromFileName(_filename);
emit updatedObject( obj->id(), UPDATE_ALL );
emit openedFile( obj->id() );
PluginFunctions::viewAll();
......@@ -326,9 +325,7 @@ bool FileSKLPlugin::saveObject(int _id, QString _filename)
SkeletonObject *skel = PluginFunctions::skeletonObject(obj);
if(skel)
{
obj->setName(_filename.section(OpenFlipper::Options::dirSeparator(), -1));
obj->setPath(_filename.section(OpenFlipper::Options::dirSeparator(), 0, -2));
obj->setFromFileName(_filename);
SaveSkeleton(skel->skeleton(), _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