Commit 8d4d50ea authored by Jan Möbius's avatar Jan Möbius
Browse files

Cleanup File-SKL

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@10903 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 1623f244
......@@ -71,33 +71,6 @@ DataType FileSKLPlugin::supportedType() {
}
int FileSKLPlugin::addEmpty( ){
// new object data struct
SkeletonObject * object = new SkeletonObject();
if ( PluginFunctions::objectCount() == 1 )
object->target(true);
if (PluginFunctions::targetCount() == 0 )
object->target(true);
QString name = get_unique_name(object);
// call the local function to update names
QFileInfo f(name);
object->setName( f.fileName() );
object->update();
object->show();
emit log(LOGINFO,object->getObjectinfo());
emit emptyObjectAdded ( object->id() );
return object->id();
}
template<typename Skeleton>
bool FileSKLPlugin::LoadSkeleton(Skeleton *_pSkeleton, QString _filename)
{
......@@ -204,7 +177,9 @@ bool FileSKLPlugin::LoadSkeleton(Skeleton *_pSkeleton, QString _filename)
int FileSKLPlugin::loadObject(QString _filename)
{
int id = addEmpty();
int id = -1;
emit addEmptyObject(DATA_SKELETON, id);
BaseObjectData *obj(0);
if(PluginFunctions::getObject(id, obj))
{
......@@ -217,7 +192,10 @@ int FileSKLPlugin::loadObject(QString _filename)
emit updatedObject( obj->id(), UPDATE_ALL );
emit openedFile( obj->id() );
PluginFunctions::viewAll();
} else {
emit log(LOGERR,tr("Unable to add empty skeleton"));
}
return id;
};
......
......@@ -93,8 +93,6 @@ class FileSKLPlugin : public QObject, BaseInterface, FileInterface, LoadSaveInte
QString name() { return (QString("FileSKL")); };
QString description( ) { return (QString("Load/Save Skeletons")); };
int addEmpty( );
DataType supportedType();
QString getSaveFilters();
......
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