Commit 34ca91e1 authored by Patrick Schmidt's avatar Patrick Schmidt
Browse files

Fixed a bug in Plugin-PropertyViz (z-coordinate was discarded when loading...

Fixed a bug in Plugin-PropertyViz (z-coordinate was discarded when loading vector property from file).
parent 31e76d0f
Pipeline #2166 passed with stage
in 78 minutes and 32 seconds
...@@ -133,7 +133,7 @@ OpenMesh::Vec3d PropertyVisualizer::strToVec3d (QString str) ...@@ -133,7 +133,7 @@ OpenMesh::Vec3d PropertyVisualizer::strToVec3d (QString str)
{ {
QString s = str; QString s = str;
s.remove(0,2); s.remove(0,2);
s.chop(2); s.truncate(s.lastIndexOf(")"));
QStringList strList = s.split(QObject::tr(", ")); QStringList strList = s.split(QObject::tr(", "));
return OpenMesh::Vec3d(strList[0].toDouble(),strList[1].toDouble(),strList[2].toDouble()); return OpenMesh::Vec3d(strList[0].toDouble(),strList[1].toDouble(),strList[2].toDouble());
} }
...@@ -142,7 +142,7 @@ OpenMesh::Vec2d PropertyVisualizer::strToVec2d (QString str) ...@@ -142,7 +142,7 @@ OpenMesh::Vec2d PropertyVisualizer::strToVec2d (QString str)
{ {
QString s = str; QString s = str;
s.remove(0,2); s.remove(0,2);
s.chop(2); s.truncate(s.lastIndexOf(")"));
QStringList strList = s.split(QObject::tr(", ")); QStringList strList = s.split(QObject::tr(", "));
return OpenMesh::Vec2d(strList[0].toDouble(),strList[1].toDouble()); return OpenMesh::Vec2d(strList[0].toDouble(),strList[1].toDouble());
} }
...@@ -151,7 +151,7 @@ OpenMesh::Vec2f PropertyVisualizer::strToVec2f (QString str) ...@@ -151,7 +151,7 @@ OpenMesh::Vec2f PropertyVisualizer::strToVec2f (QString str)
{ {
QString s = str; QString s = str;
s.remove(0,2); s.remove(0,2);
s.chop(2); s.truncate(s.lastIndexOf(")"));
QStringList strList = s.split(QObject::tr(", ")); QStringList strList = s.split(QObject::tr(", "));
return OpenMesh::Vec2f(strList[0].toFloat(),strList[1].toFloat()); return OpenMesh::Vec2f(strList[0].toFloat(),strList[1].toFloat());
} }
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