Commit 6ff33663 authored by Alexander Wiebel's avatar Alexander Wiebel
Browse files

[FIX #453] initialize slice slider correctly

parent 418e0834
......@@ -224,6 +224,14 @@ void WMTeemGlyphs::moduleMain()
}
if( m_input->getData().get() )
{
bool dataChanged = false;
if( m_dataSet != m_input->getData() )
{
// acquire data from the input connector
m_dataSet = m_input->getData();
dataChanged = true;
}
boost::shared_ptr< WGridRegular3D > gridReg = boost::shared_dynamic_cast< WGridRegular3D >( m_input->getData().get()->getGrid() );
switch( m_sliceOrientationSelection->get( true ).getItemIndexOfSelected( 0 ) )
{
......@@ -238,6 +246,11 @@ void WMTeemGlyphs::moduleMain()
break;
}
if( dataChanged )
{
m_sliceIdProp->set( m_sliceIdProp->getMax()->getMax() / 2 );
}
boost::shared_ptr< WDataSetScalar > gfa = m_inputGFA->getData();
if( gfa )
{
......
......@@ -129,6 +129,8 @@ private:
*/
void renderSlice( size_t sliceId );
boost::shared_ptr< WDataSetSphericalHarmonics > m_dataSet; //!< Pointer to the treated data set.
boost::shared_ptr< WModuleInputData< WDataSetScalar > > m_inputGFA; //!< The input for the GFA.
osg::ref_ptr< WShader > m_shader; //!< The shader used for the glyph surfaces
boost::shared_ptr< WItemSelection > m_sliceOrientations; //!< A list of the selectable slice orientations, i.e x, y and z.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment