"platforms/reference/vscode:/vscode.git/clone" did not exist on "e89c2e644c7aec20512ca39d626894a42d5cce52"
Commit 63909299 authored by Peter Eastman's avatar Peter Eastman
Browse files

Fixed bug where tuples would sometimes turn into lists when changing their units

parent 980280cb
......@@ -550,13 +550,13 @@ class Quantity(object):
def _scale_sequence(self, value, factor, post_multiply):
try:
if post_multiply:
if isinstance(value, tuple):
if isinstance(self._value, tuple):
value = tuple([x*factor for x in value])
else:
for i in range(len(value)):
value[i] = value[i]*factor
else:
if isinstance(value, tuple):
if isinstance(self._value, tuple):
value = tuple([factor*x for x in value])
else:
for i in range(len(value)):
......
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