Hi All,

I have added a print('NumberSourceDataModel') in the __init__ of 
NumberSourceDataModel.
When I run calculator.py, this message is printed 10 times as expected (5 * 
2)
But when I add a NumberSourceDataModel from the screen, I have 2 print for 
a single instance, what I find not normal.

Analyzing the code, it seems that in flow_view.py (click_handler), the 
__init__ is called once in self._scene.registry.create(model_name) and 
another time in self._scene.create_node(type_)

I would have expected that the first call just checks whether the model 
exists already instead of creating a new instance.

Calling the __init__ twice can cost a lot of time (I connect a webcam thru 
opencv in the __init__) and it takes for ever.

Do you have a solution to this issue, please ?

Jean-Pierre

-- 
You received this message because you are subscribed to the Google Groups 
"pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyqtgraph/83bd3a45-b7c2-4814-a9c1-5807cef7df59n%40googlegroups.com.

Reply via email to