Commit a24e86f7 authored by Alexander Wiebel's avatar Alexander Wiebel
Browse files

[FIX #736] fixed loading an saving of 2DTF triangles in project files

parent bb543865
......@@ -164,26 +164,26 @@ namespace PROPERTY_TYPE_HELPER
string_utils::fromString< double >( innerTokens[ 8 ].c_str() ) ) // Alpha
);
}
if( innerTokens[ 9 ] == "d" )
else if( innerTokens[ 0 ] == "d" )
{
WTransferFunction2D::PolyPoint points[3];
points[0].x = string_utils::fromString<double>( innerTokens[18].c_str() );
points[0].y = string_utils::fromString<double>( innerTokens[19].c_str() );
points[1].x = string_utils::fromString<double>( innerTokens[20].c_str() );
points[1].y = string_utils::fromString<double>( innerTokens[21].c_str() );
points[2].x = string_utils::fromString<double>( innerTokens[22].c_str() );
points[2].y = string_utils::fromString<double>( innerTokens[23].c_str() );
points[0].x = string_utils::fromString<double>( innerTokens[9].c_str() );
points[0].y = string_utils::fromString<double>( innerTokens[10].c_str() );
points[1].x = string_utils::fromString<double>( innerTokens[11].c_str() );
points[1].y = string_utils::fromString<double>( innerTokens[12].c_str() );
points[2].x = string_utils::fromString<double>( innerTokens[13].c_str() );
points[2].y = string_utils::fromString<double>( innerTokens[14].c_str() );
tf.addTriangleWidget(
points,
string_utils::fromString<double>( innerTokens[10].c_str() ), // isoX
string_utils::fromString<double>( innerTokens[11].c_str() ), // isoY
string_utils::fromString<double>( innerTokens[12].c_str() ), // width
string_utils::fromString<double>( innerTokens[13].c_str() ),
string_utils::fromString<double>( innerTokens[1].c_str() ), // isoX
string_utils::fromString<double>( innerTokens[2].c_str() ), // isoY
string_utils::fromString<double>( innerTokens[3].c_str() ), // width
string_utils::fromString<double>( innerTokens[4].c_str() ),
WColor(
string_utils::fromString<double>( innerTokens[14].c_str() ), // Red
string_utils::fromString<double>( innerTokens[15].c_str() ), // Green
string_utils::fromString<double>( innerTokens[16].c_str() ), // Blue
string_utils::fromString<double>( innerTokens[17].c_str() ) ) // Alpha
string_utils::fromString<double>( innerTokens[5].c_str() ), // Red
string_utils::fromString<double>( innerTokens[6].c_str() ), // Green
string_utils::fromString<double>( innerTokens[7].c_str() ), // Blue
string_utils::fromString<double>( innerTokens[8].c_str() ) ) // Alpha
);
}
idx++;
......@@ -218,7 +218,7 @@ namespace PROPERTY_TYPE_HELPER
std::vector<WTransferFunction2D::PolyPoint> points = tf.getPoints( i );
out << "d:" << isoX << ":" << isoY << ":" << width << ":" << height << ":"
<< c[0] << ":" << c[1] << ":" << c[2] << ":" << c[3] << ":" << points[0].x << ":" << points[0].y << ":"
<< points[1].x << ":" << points[1].y << ":" << points[2].x << ":" << points[2].y << ":" << ";";
<< points[1].x << ":" << points[1].y << ":" << points[2].x << ":" << points[2].y << ";";
}
// remove last semicolon
......
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