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:
@@ -1470,9 +1470,10 @@ Property *PropertySpreadsheetQuantity::Copy() const
|
||||
|
||||
void PropertySpreadsheetQuantity::Paste(const Property &from)
|
||||
{
|
||||
const auto &src = dynamic_cast<const PropertySpreadsheetQuantity&>(from);
|
||||
aboutToSetValue();
|
||||
_dValue = static_cast<const PropertySpreadsheetQuantity*>(&from)->_dValue;
|
||||
_Unit = static_cast<const PropertySpreadsheetQuantity*>(&from)->_Unit;
|
||||
_dValue = src._dValue;
|
||||
_Unit = src._Unit;
|
||||
hasSetValue();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user