Commit 37142ba4 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[MERGE] - branch update, needed to revert changes in data,fiberDisplay and navSlices to default

parents aa2409d3 89e35573
......@@ -52,7 +52,11 @@ WGridRegular3D::WGridRegular3D( unsigned int nbPosX, unsigned int nbPosY, unsign
m_offsetY( offsetY ),
m_offsetZ( offsetZ ),
m_matrix( 4, 4 ),
m_matrixInverse( 3, 3 )
m_matrixOrig( 4, 4 ),
m_matrixInverse( 3, 3 ),
m_translate( 0, 0, 0 ),
m_stretch( 1, 1, 1 ),
m_rotation( 0, 0, 0 )
{
m_matrix( 0, 0 ) = directionX[0];
m_matrix( 0, 1 ) = directionY[0];
......@@ -68,6 +72,7 @@ WGridRegular3D::WGridRegular3D( unsigned int nbPosX, unsigned int nbPosY, unsign
m_matrix( 2, 3 ) = originZ;
m_matrix( 3, 3 ) = 1.;
m_matrixOrig = m_matrix;
m_matrixInverse = wmath::invertMatrix4x4( m_matrix );
}
......@@ -83,7 +88,11 @@ WGridRegular3D::WGridRegular3D( unsigned int nbPosX, unsigned int nbPosY, unsign
m_offsetY( offsetY ),
m_offsetZ( offsetZ ),
m_matrix( wmath::WMatrix<double>( mat ) ),
m_matrixInverse( 3, 3 )
m_matrixOrig( 4, 4 ),
m_matrixInverse( 3, 3 ),
m_translate( 0, 0, 0 ),
m_stretch( 1, 1, 1 ),
m_rotation( 0, 0, 0 )
{
WAssert( mat.getNbRows() == 4 && mat.getNbCols() == 4, "Transformation matrix has wrong dimensions." );
// only affine transformations are allowed
......@@ -96,6 +105,7 @@ WGridRegular3D::WGridRegular3D( unsigned int nbPosX, unsigned int nbPosY, unsign
m_directionZ = WVector3D( mat( 0, 2 ) / mat( 3, 3 ), mat( 1, 2 ) / mat( 3, 3 ), mat( 2, 2 ) / mat( 3, 3 ) );
m_matrix = mat;
m_matrixOrig = m_matrix;
m_matrixInverse = wmath::invertMatrix4x4( m_matrix );
}
......@@ -116,7 +126,11 @@ WGridRegular3D::WGridRegular3D( unsigned int nbPosX, unsigned int nbPosY, unsign
m_offsetY( offsetY ),
m_offsetZ( offsetZ ),
m_matrix( 4, 4 ),
m_matrixInverse( 3, 3 )
m_matrixOrig( 4, 4 ),
m_matrixInverse( 3, 3 ),
m_translate( 0, 0, 0 ),
m_stretch( 1, 1, 1 ),
m_rotation( 0, 0, 0 )
{
m_matrix( 0, 0 ) = offsetX;
m_matrix( 1, 1 ) = offsetY;
......@@ -126,6 +140,7 @@ WGridRegular3D::WGridRegular3D( unsigned int nbPosX, unsigned int nbPosY, unsign
m_matrix( 2, 3 ) = originZ;
m_matrix( 3, 3 ) = 1.;
m_matrixOrig = m_matrix;
m_matrixInverse = wmath::invertMatrix4x4( m_matrix );
}
......@@ -145,7 +160,11 @@ WGridRegular3D::WGridRegular3D( unsigned int nbPosX, unsigned int nbPosY, unsign
m_offsetY( offsetY ),
m_offsetZ( offsetZ ),
m_matrix( 4, 4 ),
m_matrixInverse( 3, 3 )
m_matrixOrig( 4, 4 ),
m_matrixInverse( 3, 3 ),
m_translate( 0, 0, 0 ),
m_stretch( 1, 1, 1 ),
m_rotation( 0, 0, 0 )
{
m_matrix( 0, 0 ) = offsetX;
m_matrix( 1, 1 ) = offsetY;
......@@ -155,6 +174,7 @@ WGridRegular3D::WGridRegular3D( unsigned int nbPosX, unsigned int nbPosY, unsign
m_matrix( 2, 3 ) = origin[2];
m_matrix( 3, 3 ) = 1.;
m_matrixOrig = m_matrix;
m_matrixInverse = wmath::invertMatrix4x4( m_matrix );
}
......@@ -173,13 +193,18 @@ WGridRegular3D::WGridRegular3D( unsigned int nbPosX, unsigned int nbPosY, unsign
m_offsetY( offsetY ),
m_offsetZ( offsetZ ),
m_matrix( 4, 4 ),
m_matrixInverse( 3, 3 )
m_matrixOrig( 4, 4 ),
m_matrixInverse( 3, 3 ),
m_translate( 0, 0, 0 ),
m_stretch( 1, 1, 1 ),
m_rotation( 0, 0, 0 )
{
m_matrix( 0, 0 ) = offsetX;
m_matrix( 1, 1 ) = offsetY;
m_matrix( 2, 2 ) = offsetZ;
m_matrix( 3, 3 ) = 1.;
m_matrixOrig = m_matrix;
m_matrixInverse = wmath::invertMatrix4x4( m_matrix );
}
......@@ -435,3 +460,58 @@ std::pair< wmath::WPosition, wmath::WPosition > WGridRegular3D::getBoundingBox()
return std::make_pair( minBB, maxBB );
}
void WGridRegular3D::translate( wmath::WPosition translation )
{
m_translate = translation;
doCustomTransformations();
}
void WGridRegular3D::stretch( wmath::WPosition str )
{
m_stretch = str;
doCustomTransformations();
}
void WGridRegular3D::rotate( wmath::WPosition rot )
{
m_rotation = rot;
doCustomTransformations();
}
void WGridRegular3D::doCustomTransformations()
{
m_matrix = m_matrixOrig;
wmath::WMatrix<double> rotmat( 4, 4 );
rotmat.makeIdentity();
rotmat( 1, 1 ) = cos( m_rotation[0] );
rotmat( 1, 2 ) = -sin( m_rotation[0] );
rotmat( 2, 1 ) = sin( m_rotation[0] );
rotmat( 2, 2 ) = cos( m_rotation[0] );
m_matrix = m_matrix * rotmat;
rotmat.makeIdentity();
rotmat( 0, 0 ) = cos( m_rotation[1] );
rotmat( 0, 2 ) = sin( m_rotation[1] );
rotmat( 2, 0 ) = -sin( m_rotation[1] );
rotmat( 2, 2 ) = cos( m_rotation[1] );
m_matrix = m_matrix * rotmat;
rotmat.makeIdentity();
rotmat( 0, 0 ) = cos( m_rotation[2] );
rotmat( 0, 1 ) = -sin( m_rotation[2] );
rotmat( 1, 0 ) = sin( m_rotation[2] );
rotmat( 1, 1 ) = cos( m_rotation[2] );
m_matrix = m_matrix * rotmat;
m_matrix( 0, 3 ) = m_matrix( 0, 3 ) + m_translate[0];
m_matrix( 1, 3 ) = m_matrix( 1, 3 ) + m_translate[1];
m_matrix( 2, 3 ) = m_matrix( 2, 3 ) + m_translate[2];
m_matrix( 0, 0 ) = m_matrix( 0, 0 ) * m_stretch[0];
m_matrix( 1, 1 ) = m_matrix( 1, 1 ) * m_stretch[1];
m_matrix( 2, 2 ) = m_matrix( 2, 2 ) * m_stretch[2];
m_matrixInverse = wmath::invertMatrix4x4( m_matrix );
}
......@@ -393,6 +393,27 @@ public:
*/
bool isNotRotatedOrSheared() const;
/**
* translates the texture along a given vector
*
* \param translation the translation vector
*/
void translate( wmath::WPosition translation );
/**
* stretches the texture
*
* \param str the stretch factors in x,y,z direction
*/
void stretch( wmath::WPosition str );
/**
* rotates the texture around the x,y,z axis
*
* \param rot the angles for each axis
*/
void rotate( wmath::WPosition rot );
protected:
private:
......@@ -408,6 +429,11 @@ private:
*/
int getNVoxelCoord( const wmath::WPosition& pos, size_t axis ) const;
/**
* execute the texture transformation on the original transformation matrix with the stored
* translate, stretch and rotate vectors
*/
void doCustomTransformations();
wmath::WPosition m_origin; //!< Origin of the grid.
......@@ -427,10 +453,27 @@ private:
* Matrix storing the transformation of the grid. This is redundant.
* Please use m_origin and m_direction? for all normal computations.
* Use matrix only where you really need a matrix for multiplication.
*
* This is the matrix we are working with
*/
wmath::WMatrix<double> m_matrix;
/**
* Matrix storing the transformation of the grid. This is redundant.
* Please use m_origin and m_direction? for all normal computations.
* Use matrix only where you really need a matrix for multiplication.
*
* This matrix is used to store the initial value
*/
wmath::WMatrix<double> m_matrixOrig;
wmath::WMatrix<double> m_matrixInverse; //!< Inverse of m_matrix
wmath::WPosition m_translate; //!< stores the translation vector
wmath::WPosition m_stretch; //!< stores the stretch vector
wmath::WPosition m_rotation; //!< stores the rotation vector
};
inline unsigned int WGridRegular3D::getNbCoordsX() const
......
......@@ -164,4 +164,3 @@ boost::shared_ptr< WCondition > WSubject::getListChangeCondition() const
{
return m_listChangeCondition;
}
......@@ -46,6 +46,8 @@
#include "events/WModuleCrashEvent.h"
#include "events/WModuleReadyEvent.h"
#include "events/WModuleRemovedEvent.h"
#include "events/WModuleConnectEvent.h"
#include "events/WModuleDisconnectEvent.h"
#include "events/WOpenCustomDockWidgetEvent.h"
#include "events/WRoiAssocEvent.h"
#include "events/WRoiRemoveEvent.h"
......@@ -171,6 +173,14 @@ int WQt4Gui::run()
t_ModuleGenericSignalHandlerType removedSignal = boost::bind( &WQt4Gui::slotRemoveDatasetOrModuleInBrowser, this, _1 );
m_kernel->getRootContainer()->addDefaultNotifier( WM_REMOVED, removedSignal );
// Connect Event
t_GenericSignalHandlerType connectionEstablishedSignal = boost::bind( &WQt4Gui::slotConnectionEstablished, this, _1, _2 );
m_kernel->getRootContainer()->addDefaultNotifier( CONNECTION_ESTABLISHED, connectionEstablishedSignal );
// Disconnect Event
t_GenericSignalHandlerType connectionClosedSignal = boost::bind( &WQt4Gui::slotConnectionClosed, this, _1, _2 );
m_kernel->getRootContainer()->addDefaultNotifier( CONNECTION_CLOSED, connectionClosedSignal );
boost::function< void( boost::shared_ptr< WRMROIRepresentation > ) > assocRoiSignal =
boost::bind( &WQt4Gui::slotAddRoiToBrowser, this, _1 );
m_kernel->getRoiManager()->addAddNotifier( assocRoiSignal );
......@@ -285,6 +295,32 @@ void WQt4Gui::slotRemoveDatasetOrModuleInBrowser( boost::shared_ptr< WModule > m
QCoreApplication::postEvent( m_mainWindow->getDatasetBrowser(), new WModuleRemovedEvent( module ) );
}
void WQt4Gui::slotConnectionEstablished( boost::shared_ptr<WModuleConnector> in, boost::shared_ptr<WModuleConnector> out )
{
// create a new event for this and insert it into event queue
if ( in->isInputConnector() )
{
QCoreApplication::postEvent( m_mainWindow->getDatasetBrowser(), new WModuleConnectEvent( in, out ) );
}
else
{
QCoreApplication::postEvent( m_mainWindow->getDatasetBrowser(), new WModuleConnectEvent( out, in ) );
}
}
void WQt4Gui::slotConnectionClosed( boost::shared_ptr<WModuleConnector> in, boost::shared_ptr<WModuleConnector> out )
{
// create a new event for this and insert it into event queue
if ( in->isInputConnector() )
{
QCoreApplication::postEvent( m_mainWindow->getDatasetBrowser(), new WModuleDisconnectEvent( in, out ) );
}
else
{
QCoreApplication::postEvent( m_mainWindow->getDatasetBrowser(), new WModuleDisconnectEvent( out, in ) );
}
}
boost::shared_ptr< WModule > WQt4Gui::getSelectedModule()
{
return m_mainWindow->getDatasetBrowser()->getSelectedModule();
......
......@@ -114,6 +114,22 @@ public:
*/
virtual void slotRemoveDatasetOrModuleInBrowser( boost::shared_ptr< WModule > module );
/**
* Slot gets called whenever a connector pair got connected.
*
* \param in input connector
* \param out output connector
*/
virtual void slotConnectionEstablished( boost::shared_ptr<WModuleConnector> in, boost::shared_ptr<WModuleConnector> out );
/**
* Slot gets called whenever a connector pair got disconnected.
*
* \param in input connector
* \param out output connector
*/
virtual void slotConnectionClosed( boost::shared_ptr<WModuleConnector> in, boost::shared_ptr<WModuleConnector> out );
/**
* getter functions for the signales proved by the gui
*/
......
......@@ -72,7 +72,7 @@ WQtCombinerActionList::WQtCombinerActionList( QWidget* parent, WIconManager* ico
for ( WCombinerTypes::WOneToOneCombiners::iterator combiner = ( *groups ).second.begin();
combiner != ( *groups ).second.end(); ++combiner )
{
WQtModuleOneToOneCombinerAction* a = new WQtModuleOneToOneCombinerAction( parent, icons, *groups->second.begin(), true );
WQtModuleOneToOneCombinerAction* a = new WQtModuleOneToOneCombinerAction( parent, icons, *combiner, true );
a->setIconVisibleInMenu( true );
groupMenu->addAction( a );
......@@ -102,7 +102,7 @@ WQtCombinerActionList::WQtCombinerActionList( QWidget* parent, WIconManager* ico
for ( WCombinerTypes::WOneToOneCombiners::iterator combiner = ( *groups ).second.begin();
combiner != ( *groups ).second.end(); ++combiner )
{
WQtModuleOneToOneCombinerAction* a = new WQtModuleOneToOneCombinerAction( parent, icons, *groups->second.begin(), true );
WQtModuleOneToOneCombinerAction* a = new WQtModuleOneToOneCombinerAction( parent, icons, *combiner, true );
a->setIconVisibleInMenu( true );
groupMenu->addAction( a );
......
......@@ -59,7 +59,7 @@ WPropertyDoubleWidget::WPropertyDoubleWidget( WPropDouble property, QGridLayout*
update();
// connect the modification signal of the edit and slider with our callback
connect( &m_slider, SIGNAL( valueChanged( int ) ), this, SLOT( sliderChanged( int ) ) );
connect( &m_slider, SIGNAL( sliderMoved( int ) ), this, SLOT( sliderChanged( int ) ) );
connect( &m_edit, SIGNAL( returnPressed() ), this, SLOT( editChanged() ) );
connect( &m_edit, SIGNAL( textEdited( const QString& ) ), this, SLOT( textEdited( const QString& ) ) );
}
......@@ -170,17 +170,17 @@ void WPropertyDoubleWidget::editChanged()
// set the value in the line edit
bool valid;
double value = m_edit.text().toDouble( &valid );
if ( !valid )
{
invalidate();
return;
}
// set to the property
invalidate( !m_doubleProperty->set( value ) ); // NOTE: set automatically checks the validity of the value
// update slider
m_slider.setValue( toPercent( value ) );
// set to the property
invalidate( !m_doubleProperty->set( value ) ); // NOTE: set automatically checks the validity of the value
}
void WPropertyDoubleWidget::textEdited( const QString& text )
......
......@@ -59,7 +59,7 @@ WPropertyIntWidget::WPropertyIntWidget( WPropInt property, QGridLayout* property
update();
// connect the modification signal of the edit and slider with our callback
connect( &m_slider, SIGNAL( valueChanged( int ) ), this, SLOT( sliderChanged( int ) ) );
connect( &m_slider, SIGNAL( sliderMoved( int ) ), this, SLOT( sliderChanged( int ) ) );
connect( &m_edit, SIGNAL( returnPressed() ), this, SLOT( editChanged() ) );
connect( &m_edit, SIGNAL( textEdited( const QString& ) ), this, SLOT( textEdited( const QString& ) ) );
}
......
......@@ -23,6 +23,7 @@
//---------------------------------------------------------------------------
#include <iostream>
#include <list>
#include <map>
#include <set>
#include <string>
......@@ -47,6 +48,8 @@
#include "../events/WModuleDeleteEvent.h"
#include "../events/WModuleReadyEvent.h"
#include "../events/WModuleRemovedEvent.h"
#include "../events/WModuleConnectEvent.h"
#include "../events/WModuleDisconnectEvent.h"
#include "../events/WRoiAssocEvent.h"
#include "../events/WRoiRemoveEvent.h"
#include "../WMainWindow.h"
......@@ -60,7 +63,8 @@
#include "WQtDatasetBrowser.h"
WQtDatasetBrowser::WQtDatasetBrowser( WMainWindow* parent )
: QDockWidget( "Dataset Browser", parent )
: QDockWidget( "Dataset Browser", parent ),
m_ignoreSelectionChange( false )
{
m_mainWindow = parent;
......@@ -72,7 +76,6 @@ WQtDatasetBrowser::WQtDatasetBrowser( WMainWindow* parent )
m_moduleTreeWidget->setDragEnabled( false );
m_moduleTreeWidget->viewport()->setAcceptDrops( true );
m_moduleTreeWidget->setDropIndicatorShown( true );
m_moduleTreeWidget->setDragDropMode( QAbstractItemView::InternalMove );
m_moduleTreeWidget->setMinimumHeight( 250 );
// create context menu for tree items
......@@ -197,6 +200,29 @@ bool WQtDatasetBrowser::event( QEvent* event )
m_textureSorter->update();
}
if ( event->type() == WQT_ROI_ASSOC_EVENT )
{
WRoiAssocEvent* e2 = dynamic_cast< WRoiAssocEvent* >( event ); // NOLINT
if ( e2 )
{
addRoi( e2->getRoi() );
WLogger::getLogger()->addLogMessage( "Inserting roi to dataset browser.", "DatasetBrowser", LL_DEBUG );
}
return true;
}
if( event->type() == WQT_ROI_REMOVE_EVENT )
{
WRoiRemoveEvent* e3 = dynamic_cast< WRoiRemoveEvent* >( event );
if( e3 )
{
removeRoi( e3->getRoi() );
WLogger::getLogger()->addLogMessage( "Removing roi from dataset browser.", "DatasetBrowser", LL_DEBUG );
}
return true;
}
// a module got associated with the root container -> add it to the list
if ( event->type() == WQT_ASSOC_EVENT )
{
......@@ -220,27 +246,130 @@ bool WQtDatasetBrowser::event( QEvent* event )
}
return true;
}
if ( event->type() == WQT_ROI_ASSOC_EVENT )
// a module changed its state to "ready" -> activate it in dataset browser
if ( event->type() == WQT_READY_EVENT )
{
WRoiAssocEvent* e2 = dynamic_cast< WRoiAssocEvent* >( event ); // NOLINT
if ( e2 )
// convert event to assoc event
WModuleReadyEvent* e = dynamic_cast< WModuleReadyEvent* >( event ); // NOLINT
if ( !e )
{
addRoi( e2->getRoi() );
WLogger::getLogger()->addLogMessage( "Inserting roi to dataset browser.", "DatasetBrowser", LL_DEBUG );
// this should never happen, since the type is set to WQT_Ready_EVENT.
WLogger::getLogger()->addLogMessage( "Event is not an WModueReadyEvent although its type claims it. Ignoring event.",
"DatasetBrowser", LL_WARNING );
return true;
}
WLogger::getLogger()->addLogMessage( "Activating module " + e->getModule()->getName() + " in dataset browser.",
"DatasetBrowser", LL_DEBUG );
// search all the item matching the module
std::list< WQtTreeItem* > items = findItemsByModule( e->getModule() );
for ( std::list< WQtTreeItem* >::const_iterator iter = items.begin(); iter != items.end(); ++iter )
{
( *iter )->setSelected( true );
( *iter )->setDisabled( false );
}
selectTreeItem();
return true;
}
if( event->type() == WQT_ROI_REMOVE_EVENT )
// a module tree item was connected to another one
if ( event->type() == WQT_MODULE_CONNECT_EVENT )
{
WRoiRemoveEvent* e3 = dynamic_cast< WRoiRemoveEvent* >( event );
if( e3 )
WModuleConnectEvent* e = dynamic_cast< WModuleConnectEvent* >( event ); // NOLINT
if ( !e )
{
removeRoi( e3->getRoi() );
WLogger::getLogger()->addLogMessage( "Removing roi from dataset browser.", "DatasetBrowser", LL_DEBUG );
// this should never happen, since the type is set to WQT_Ready_EVENT.
WLogger::getLogger()->addLogMessage( "Event is not an WModuleConnectEvent although its type claims it. Ignoring event.",
"DatasetBrowser", LL_WARNING );
return true;
}
return true;
// get the module of the input involved in this connection
boost::shared_ptr< WModule > mIn = e->getInput()->getModule();
boost::shared_ptr< WModule > mOut = e->getOutput()->getModule();
// NOTE: the following is ugly. We definitely should rethink our GUI
// at this moment items for each input connector are inside the tree.
// search the items not yet associated with some other module for the first item
std::list< WQtTreeItem* > items = findItemsByModule( mIn, m_tiModules );
for ( std::list< WQtTreeItem* >::const_iterator iter = items.begin(); iter != items.end(); ++iter )
{
( *iter )->setHidden( false );
( *iter )->setHandledInput( e->getInput()->getName() );
( *iter )->setHandledOutput( e->getOutput()->getName() );
// move it to the module with the involved output
std::list< WQtTreeItem* > possibleParents = findItemsByModule( mOut );
for ( std::list< WQtTreeItem* >::const_iterator parIter = possibleParents.begin(); parIter != possibleParents.end(); ++parIter )
{
// remove child from tiModules
m_tiModules->removeChild( *iter );
( *parIter )->addChild( *iter );
( *parIter )->setExpanded( true );
}
// job done.
break;
}
}
// a module tree item was disconnected from another one
if ( event->type() == WQT_MODULE_DISCONNECT_EVENT )
{
WModuleDisconnectEvent* e = dynamic_cast< WModuleDisconnectEvent* >( event ); // NOLINT
if ( !e )
{
// this should never happen, since the type is set to WQT_Ready_EVENT.
WLogger::getLogger()->addLogMessage( "Event is not an WModuleDisconnectEvent although its type claims it. Ignoring event.",
"DatasetBrowser", LL_WARNING );
return true;
}
// get the module of the input involved in this connection
boost::shared_ptr< WModule > mIn = e->getInput()->getModule();
boost::shared_ptr< WModule > mOut = e->getOutput()->getModule();
// NOTE: the following is ugly. We definitely should rethink our GUI
// at this moment items for each input connector are inside the tree.
// search all items an find those containing a children which belongs to the connection input
std::list< WQtTreeItem* > items = findItemsByModule( mOut );
for ( std::list< WQtTreeItem* >::const_iterator iter = items.begin(); iter != items.end(); ++iter )
{
// each of them can contain a child with the involved input
std::list< WQtTreeItem* > childs = findItemsByModule( mIn, *iter );
for ( std::list< WQtTreeItem* >::const_iterator citer = childs.begin(); citer != childs.end(); ++citer )
{
if ( ( *citer )->getHandledInput() == e->getInput()->getName() )
{
( *iter )->removeChild( *citer );
// move it back to the reservoir in m_tiModules
m_tiModules->addChild( *citer );
( *citer )->setHidden( true );
( *citer )->setHandledInput( "" );
( *citer )->setHandledOutput( "" );
}
}
}
// we need to ensure that at least one item for mIn is visible somewhere
items = findItemsByModule( mIn );
bool oneVisible = false;
for ( std::list< WQtTreeItem* >::const_iterator iter = items.begin(); iter != items.end(); ++iter )
{
oneVisible = oneVisible || !( *iter )->isHidden();
}
if ( !oneVisible )
{
( *items.begin() )->setHidden( false );
}
}
// a module tree item should be deleted
......@@ -263,8 +392,9 @@ bool WQtDatasetBrowser::event( QEvent* event )
// remove it from the tree and free last ref count
m_moduleTreeWidget->deleteItem( e->getTreeItem() );
// ref count != 1?
if ( module.use_count() != 1 )
// ref count != 1? (only if there are now tree items left)
bool lastTreeItem = !findItemsByModule( module ).size();
if ( lastTreeItem && ( module.use_count() != 1 ) )
{
wlog::warn( "DatasetBrowser" ) << "Removed module has strange usage count: " << module.use_count() << ". Should be 1 here. " <<
"Module reference is held by someone else.";
......@@ -286,30 +416,10 @@ bool WQtDatasetBrowser::event( QEvent* event )
}
// iterate tree items and find proper one
QTreeWidgetItemIterator it( m_moduleTreeWidget );
while ( *it )
std::list< WQtTreeItem* > items = findItemsByModule( e->getModule() );
for ( std::list< WQtTreeItem* >::const_iterator iter = items.begin