InputFile: Don't try to create device twice
authorSoeren Apel <soeren@apelpie.net>
Fri, 8 Apr 2016 21:32:54 +0000 (23:32 +0200)
committerSoeren Apel <soeren@apelpie.net>
Fri, 8 Apr 2016 21:34:45 +0000 (23:34 +0200)
The InputFile currently only keeps track of the
need for a device instance local to run().
This means that when calling run() a second time
(e.g. by clicking the "Run" button after loading
a file), the function will try to create the
device instance and add it to the session.
This fails as the first created instance is
still assigned to the session and thus the
session will reject adding another device.

Furthermore, simply clearing the session
devices isn't enough for proper operation.
The issue is that once a file's content has
been sent to an input module, the module is
not going to accept another file. It needs
to be reset to its initial state. To do this,
we create the input module instance every time
we want to read the file.


No differences found