Commit 0f74077a authored by Jan Möbius's avatar Jan Möbius

Merge branch 'fix_property_viz' into 'master'

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

…r property from file).

See merge request !116
parents 31e76d0f b68a2ef6
Pipeline #2222 passed with stage
in 79 minutes and 57 seconds
......@@ -133,7 +133,7 @@ OpenMesh::Vec3d PropertyVisualizer::strToVec3d (QString str)
{
QString s = str;
s.remove(0,2);
s.chop(2);
s.truncate(s.lastIndexOf(")"));
QStringList strList = s.split(QObject::tr(", "));
return OpenMesh::Vec3d(strList[0].toDouble(),strList[1].toDouble(),strList[2].toDouble());
}
......@@ -142,7 +142,7 @@ OpenMesh::Vec2d PropertyVisualizer::strToVec2d (QString str)
{
QString s = str;
s.remove(0,2);
s.chop(2);
s.truncate(s.lastIndexOf(")"));
QStringList strList = s.split(QObject::tr(", "));
return OpenMesh::Vec2d(strList[0].toDouble(),strList[1].toDouble());
}
......@@ -151,7 +151,7 @@ OpenMesh::Vec2f PropertyVisualizer::strToVec2f (QString str)
{
QString s = str;
s.remove(0,2);
s.chop(2);
s.truncate(s.lastIndexOf(")"));
QStringList strList = s.split(QObject::tr(", "));
return OpenMesh::Vec2f(strList[0].toFloat(),strList[1].toFloat());
}
......@@ -203,8 +203,9 @@ void SingleObjectPropertyModel::objectUpdated()
QString SingleObjectPropertyModel::getLoadFilename()
{
QString filter = getLoadFilenameFilter();
QString selected_filter = tr("All Files (*)");
QString fileName = QFileDialog::getOpenFileName(0, tr("Load Property"), QString(), filter);
QString fileName = QFileDialog::getOpenFileName(0, tr("Load Property"), QString(), filter, &selected_filter);
return fileName;
}
......
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