Import 2017-06-07 23:51:09: master 3d5f63fc

Author Committer Branch Timestamp Parent
jcfr jcfr master 2016-01-06 17:29:27 master 0ac807fb
Changeset

BUG: Fix CLI running issues and add tests to prevent future regression.

Before, the CLI module logic would add the observer before running the CLI
and remove it once the CLI is modified. This proved to be error prone, for
example if two CLIs are ran at the same time. One CLI would finish and
remove the observation, preventing the other one from ever finishing.
Instead, we propose to always listen to the event. This make the code
simpler and more robust.

Thanks to Alexis and Dzenan for their help creating a simple test case.

Reported-by: Dzenan Zukic <dzenan.zukic@kitware.com>
Co-authored-by: Alexis Girault <alexis.girault@kitware.com>
Co-authored-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>

From: Johan Andruejol <johan.andruejol@kitware.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24834 3bd1e089-480b-0410-8dfb-8563597acbee

mod - Applications/SlicerApp/Testing/Python/CMakeLists.txt Diff File
add - Applications/SlicerApp/Testing/Python/TwoCLIsInARowTest.py Diff File
add - Applications/SlicerApp/Testing/Python/TwoCLIsInParallelTest.py Diff File
mod - Base/QTCLI/vtkSlicerCLIModuleLogic.cxx Diff File
mod - Base/QTCLI/vtkSlicerCLIModuleLogic.h Diff File