tomviz
tomviz copied to clipboard
Pasting into python editor sometimes results in duplicated code
If I try to copy and paste a line of code from a website into the python editor, it sometimes duplicates all of the code up to the line where I pasted, and deletes all the code after the line where I pasted.
For instance, if the function is this:
def transform(dataset):
import numpy as np
array = dataset.active_scalars
result = np.sqrt(array)
dataset.active_scalars = result
And if I copy and paste array = np.square(array) into a new line right before the np.sqrt(), I end up with:
def transform(dataset):
import numpy as np
array = dataset.active_scalars
array = np.square(array)
def transform(dataset):
import numpy as np
array = dataset.active_scalars
array = np.square(array)
The code after the pasted part is gone, and it is replaced with a copy of all the code up to (and including) the pasted line.
This is happening on my local build of tomviz on Ubuntu 18.04.
I have seen this occasionally, but I am not sure if this is a Tomviz bug, or something in Qt/ParaView code. It would be good to get to the root of.