Commit e5110ab7 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum

[FIX] - modules now get appended to visible treeitems only. This fixes the...

[FIX] - modules now get appended to visible treeitems only. This fixes the problem where only one of two inputs is connected and the output should be added to the tree which then is invisible as it gets added to the invisible item only.
parent 1a224d52
......@@ -320,8 +320,12 @@ bool WQtControlPanel::event( QEvent* event )
{
// remove child from tiModules
m_tiModules->removeChild( *iter );
( *parIter )->addChild( *iter );
( *parIter )->setExpanded( true );
if ( !( *parIter )->isHidden() )
{
( *parIter )->addChild( *iter );
( *parIter )->setExpanded( true );
break;
}
}
// job done.
......@@ -481,7 +485,10 @@ std::list< WQtTreeItem* > WQtControlPanel::findItemsByModule( boost::shared_ptr<
std::list< WQtTreeItem* > WQtControlPanel::findItemsByModule( boost::shared_ptr< WModule > module )
{
return findItemsByModule( module, m_moduleTreeWidget->invisibleRootItem() );
std::list< WQtTreeItem* > ret = findItemsByModule( module, m_moduleTreeWidget->invisibleRootItem() );
std::list< WQtTreeItem* > ret2 = findItemsByModule( module, m_moduleTreeWidget->topLevelItem( 0 ) );
ret.merge( ret2 );
return ret;
}
WQtDatasetTreeItem* WQtControlPanel::addDataset( boost::shared_ptr< WModule > module, int subjectId )
......
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