mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-13 00:07:24 +00:00
fix random crash on save ply custom attributes: qUtf8Printable should *never* be used when passing string arguments
This commit is contained in:
parent
3ac31eaaa0
commit
cd5494d715
@ -414,25 +414,25 @@ void BaseMeshIOPlugin::save(const QString &formatName, const QString &fileName,
|
||||
// if pname starts with __CA_VS__, it is a PLY per-vertex scalar custom attribute
|
||||
if (pname.startsWith("__CA_VS__")) {
|
||||
if (par.getBool(pname)) { // if it is true, add to save list
|
||||
pi.addPerVertexScalarAttribute(qUtf8Printable(pname.mid(9)), scalarPlyType);
|
||||
pi.addPerVertexScalarAttribute(pname.toStdString().substr(9), scalarPlyType);
|
||||
}
|
||||
}
|
||||
// if pname starts with __CA_VP__, it is a PLY per-vertex point3m custom attribute
|
||||
else if (pname.startsWith("__CA_VP__")) {
|
||||
if (par.getBool(pname)) { // if it is true, add to save list
|
||||
pi.addPerVertexPoint3mAttribute(qUtf8Printable(pname.mid(9)), scalarPlyType);
|
||||
pi.addPerVertexPoint3mAttribute(pname.toStdString().substr(9), scalarPlyType);
|
||||
}
|
||||
}
|
||||
// if pname starts with __CA_FS__, it is a PLY per-face scalar custom attribute
|
||||
else if (pname.startsWith("__CA_FS__")) {
|
||||
if (par.getBool(pname)) { // if it is true, add to save list
|
||||
pi.addPerFaceScalarAttribute(qUtf8Printable(pname.mid(9)), scalarPlyType);
|
||||
pi.addPerFaceScalarAttribute(pname.toStdString().substr(9), scalarPlyType);
|
||||
}
|
||||
}
|
||||
// if pname starts with __CA_FP__, it is a PLY per-face point3m custom attribute
|
||||
else if (pname.startsWith("__CA_FP__")) {
|
||||
if (par.getBool(pname)) {
|
||||
pi.addPerFacePoint3mAttribute(qUtf8Printable(pname.mid(9)), scalarPlyType);
|
||||
pi.addPerFacePoint3mAttribute(pname.toStdString().substr(9), scalarPlyType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user