浏览代码

Fix TransitionList to string.

Michael Ragazzon 6 年之前
父节点
当前提交
ffc0df9c39
共有 2 个文件被更改,包括 5 次插入4 次删除
  1. 4 2
      Source/Core/PropertyParserAnimation.cpp
  2. 1 2
      Source/Core/TypeConverter.cpp

+ 4 - 2
Source/Core/PropertyParserAnimation.cpp

@@ -219,7 +219,8 @@ static bool ParseAnimation(Property & property, const StringList& animation_valu
 		animation_list.push_back(std::move(animation));
 	}
 
-	property = Property{ animation_list, Property::ANIMATION };
+	property.value = std::move(animation_list);
+	property.unit = Property::ANIMATION;
 
 	return true;
 }
@@ -343,7 +344,8 @@ static bool ParseTransition(Property & property, const StringList& transition_va
 		}
 	}
 
-	property = Property{ transition_list, Property::TRANSITION };
+	property.value = std::move(transition_list);
+	property.unit = Property::TRANSITION;
 
 	return true;
 }

+ 1 - 2
Source/Core/TypeConverter.cpp

@@ -76,9 +76,8 @@ bool TypeConverter<TransitionList, String>::Convert(const TransitionList& src, S
 	String tmp;
 	for (size_t i = 0; i < src.transitions.size(); i++)
 	{
-		// TODO: Add property name from id
 		const Transition& t = src.transitions[i];
-		//dest += t.id + " ";
+		dest += StyleSheetSpecification::GetPropertyName(t.id) + " ";
 		dest += t.tween.to_string() + " ";
 		if (TypeConverter< float, String >::Convert(t.duration, tmp)) dest += tmp + "s ";
 		if (t.delay > 0.0f && TypeConverter< float, String >::Convert(t.delay, tmp)) dest += tmp + "s ";