Commit 60a66155 authored by Martin Schultz's avatar Martin Schultz

Applied the refinement patch from Jan

refs #1908

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@20560 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 0e38287d
...@@ -490,14 +490,14 @@ void TopologyPlugin::split_face(QMouseEvent* _event) { ...@@ -490,14 +490,14 @@ void TopologyPlugin::split_face(QMouseEvent* _event) {
if ( _event->type() != QEvent::MouseButtonPress ) if ( _event->type() != QEvent::MouseButtonPress )
return; return;
unsigned int node_idx, target_idx; unsigned int target_idx;
ACG::Vec3d hit_point; ACG::Vec3d hit_point;
if (PluginFunctions::scenegraphPick(ACG::SceneGraph::PICK_FACE, _event->pos(),node_idx, target_idx, &hit_point)) { BaseObjectData* object;
BaseObjectData* object; if (PluginFunctions::scenegraphPick(ACG::SceneGraph::PICK_FACE, _event->pos(),object, target_idx, true, &hit_point)) {
if ( PluginFunctions::getPickedObject(node_idx, object) ) { if ( object != 0 ) {
if ( object->picked(node_idx) && object->dataType(DATA_TRIANGLE_MESH) ) { if ( object->dataType(DATA_TRIANGLE_MESH) ) {
TriMesh& m = *PluginFunctions::triMesh(object); TriMesh& m = *PluginFunctions::triMesh(object);
TriMesh::FaceHandle fh = m.face_handle(target_idx); TriMesh::FaceHandle fh = m.face_handle(target_idx);
...@@ -516,7 +516,7 @@ void TopologyPlugin::split_face(QMouseEvent* _event) { ...@@ -516,7 +516,7 @@ void TopologyPlugin::split_face(QMouseEvent* _event) {
emit createBackup(object->id(),"Split Face", UPDATE_TOPOLOGY); emit createBackup(object->id(),"Split Face", UPDATE_TOPOLOGY);
} }
if ( object->picked(node_idx) && object->dataType(DATA_POLY_MESH) ) { if ( object->dataType(DATA_POLY_MESH) ) {
PolyMesh& m = *PluginFunctions::polyMesh(object); PolyMesh& m = *PluginFunctions::polyMesh(object);
PolyMesh::FaceHandle fh = m.face_handle(target_idx); PolyMesh::FaceHandle fh = m.face_handle(target_idx);
......
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