App: fix dynamic property undo/redo

Instead of enforce property type match when undo/redo, modify various
property Paste() to make it type safe.
This commit is contained in:
Zheng, Lei
2019-09-30 14:18:40 +08:00
committed by wmayer
parent cc94eb9966
commit f6ad70195f
6 changed files with 37 additions and 24 deletions

View File

@@ -56,7 +56,7 @@ App::Property *PropertyRowHeights::Copy() const
void PropertyRowHeights::Paste(const Property &from)
{
setValues(static_cast<const PropertyRowHeights&>(from).getValues());
setValues(dynamic_cast<const PropertyRowHeights&>(from).getValues());
}
void PropertyRowHeights::setValues(const std::map<int,int> &values) {