Page MenuHomePhabricator

Picking tool stops working if Measurement plugin is active
Closed, ResolvedPublic

Description

This can be reproduced in MITK 2016.3.0

Steps to reproduce:

  1. Load some image,
  2. Open Segmentation plugin and Measurement plugin.
  3. Add segmentation.
  4. With Add tool add two areas to it.
  5. Switch to picking tool.
    • Now picking tool is working as expected.
  6. Select any other tool and activate picking tool again.
    • Now picking tool doesn't work at all.

This happens because of QmitkMeasurementView::NodeRemoved(const mitk::DataNode* node) function from Measurement plugin.
This function removes interactor from any node that is removed from storage. As far as I can say, it's requred for a proper work of planar figures deletion.

But this means that m_PointSetNode from picking tool doesn't have interactor after picking tool is deactivated for the first time, because interactor is bound to m_PointSetNode only once, in mitk::PickingTool constructor. And without interactor picking tool can't get base point.

I think that QmitkMeasurementView should remove interactor from removed nodes more carefully, maybe do this only for PlanarFigure nodes.

Event Timeline

kislinsk triaged this task as Normal priority.Sep 5 2016, 12:19 PM
kislinsk edited projects, added MITK (2016-11); removed MITK.

This bug can be prevented by moving the interactor initialization from constructor to method "Activated" (see other segmentation tools with seed point interactions).