Commit e95b871c authored by Matthias Möller's avatar Matthias Möller

- use OF signals for object updates

- invoke of ""viewAll" moved from the end of the reader to "openedFile" slot, as every reader invoked it but openedFile just, if only one object was loaded
- prepares asnyc load

refs #2421

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@20986 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 754dfdd5
......@@ -152,7 +152,7 @@ int FileOMPlugin::loadObject(QString _filename) {
PolyMeshObject* object(0);
if(PluginFunctions::getObject( objectId, object )) {
object->show();
emit updatedObject(objectId, UPDATE_ALL);
emit openedFile( objectId );
}
......@@ -204,7 +204,6 @@ int FileOMPlugin::loadObject(QString _filename) {
PolyMeshObject* object(0);
if(PluginFunctions::getObject( objectId, object )) {
object->show();
emit openedFile( objectId );
}
return objectId;
......@@ -218,7 +217,7 @@ int FileOMPlugin::loadObject(QString _filename) {
PolyMeshObject* object(0);
if(PluginFunctions::getObject( objectId, object )) {
object->show();
emit updatedObject(objectId, UPDATE_ALL);
emit openedFile( objectId );
}
......@@ -230,8 +229,7 @@ int FileOMPlugin::loadObject(QString _filename) {
TriMeshObject* object(0);
if(PluginFunctions::getObject( objectId, object )) {
object->show();
emit updatedObject(objectId, UPDATE_ALL);
emit openedFile( objectId );
}
......@@ -246,7 +244,7 @@ int FileOMPlugin::loadObject(QString _filename) {
TriMeshObject* object(0);
if(PluginFunctions::getObject( objectId, object )) {
object->show();
emit updatedObject(objectId, UPDATE_ALL);
emit openedFile( objectId );
}
......@@ -320,8 +318,6 @@ int FileOMPlugin::loadTriMeshObject(QString _filename){
object->mesh()->update_normals();
object->update();
backupTextureCoordinates(*(object->mesh()));
return object->id();
......@@ -411,8 +407,6 @@ int FileOMPlugin::loadPolyMeshObject(QString _filename){
object->mesh()->update_normals();
object->update();
backupTextureCoordinates(*(object->mesh()));
return object->id();
......
......@@ -81,6 +81,7 @@ class FileOMPlugin : public QObject, BaseInterface, FileInterface, LoadSaveInter
void log(Logtype _type, QString _message);
void log(QString _message);
void updateView();
void updatedObject(int _identifier, const UpdateType& _type);
void deleteObject( int _id );
......
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