Hi MITK,
I was creating a context menu action and I saw that SetDataStorage was
never called. I found in QmitkDataManagerView.cpp this snippet:
if(className == "QmitkCreatePolygonModelAction")
{
contextMenuAction->*SetDataStorage*(this->GetDataStorage());
if(smoothed == "false")
{
contextMenuAction->SetSmoothed(false);
}
else
{
contextMenuAction->SetSmoothed(true);
}
contextMenuAction->SetDecimated(m_SurfaceDecimation);
}
else if(className == "QmitkStatisticsAction")
{
contextMenuAction->SetFunctionality(this);
}
else if(className == "QmitkCreateSimulationAction")
{
contextMenuAction->*SetDataStorage*(this->GetDataStorage());
}
I don't understand this decision. Why not simply always set it? I know
that Smoothed, Decimated and Functionality are hacks useful only to a
single class, but DataStorage is useful in many cases. Well, I don't
know for the other programmers out there, but I often need the
DataStorage in my context menu actions.
Right now, I'm forced to use my plugin's context, getServiceReference,
IDataStorageService and include a lot of files to get it. This could
easily be avoided if SetDataStorage was always called. I just tried it
and it works perfectly. In fact, I don't see how it could break anything.
Nil
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users