Commit 192788b0 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 1131b86a
...@@ -1215,9 +1215,6 @@ int FileOFFPlugin::loadObject(QString _filename) { ...@@ -1215,9 +1215,6 @@ int FileOFFPlugin::loadObject(QString _filename) {
polyMeshObj->mesh()->update_face_normals(); polyMeshObj->mesh()->update_face_normals();
backupTextureCoordinates(*(polyMeshObj->mesh())); backupTextureCoordinates(*(polyMeshObj->mesh()));
polyMeshObj->update();
polyMeshObj->show();
} }
// Handle new TriMeshes // Handle new TriMeshes
...@@ -1231,17 +1228,12 @@ int FileOFFPlugin::loadObject(QString _filename) { ...@@ -1231,17 +1228,12 @@ int FileOFFPlugin::loadObject(QString _filename) {
triMeshObj->mesh()->update_face_normals(); triMeshObj->mesh()->update_face_normals();
backupTextureCoordinates(*(triMeshObj->mesh())); backupTextureCoordinates(*(triMeshObj->mesh()));
triMeshObj->update();
triMeshObj->show();
} }
//general stuff //general stuff
emit updatedObject(object->id(), UPDATE_ALL);
emit openedFile( object->id() ); emit openedFile( object->id() );
// Update viewport
PluginFunctions::viewAll();
forceTriangleMesh_ = false; forceTriangleMesh_ = false;
forcePolyMesh_ = false; forcePolyMesh_ = false;
return object->id(); return object->id();
......
...@@ -84,6 +84,7 @@ class FileOFFPlugin : public QObject, BaseInterface, FileInterface, LoadSaveInte ...@@ -84,6 +84,7 @@ class FileOFFPlugin : public QObject, BaseInterface, FileInterface, LoadSaveInte
void log(Logtype _type, QString _message); void log(Logtype _type, QString _message);
void log(QString _message); void log(QString _message);
void updateView(); void updateView();
void updatedObject(int _identifier, const UpdateType& _type);
void deleteObject( int _id ); 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