Commit fcf50a8e authored by Alexander Wiebel's avatar Alexander Wiebel
Browse files

[FIX #163] fixed crash when selecting butterfly plot

parent a7e940dd
......@@ -64,7 +64,6 @@ WEEGSourceCalculator::WEEGSourceCalculator( const boost::shared_ptr< const WEEG2
WPosition WEEGSourceCalculator::calculate( const boost::shared_ptr< const WEEGEvent > event ) const
{
const std::vector< double >& values = event->getValues();
WAssert( values.size() == m_hasPosition.size(), "Event and loaded EEG dataset have to have the same number of channels" );
double sum = 0.0;
......
......@@ -227,7 +227,7 @@ void WMEEGView::moduleMain()
while( !m_shutdownFlag() ) // loop until the module container requests the module to quit
{
// data changed?
if( m_dataChanged() || m_butterfly->changed( true ) )
if( m_dataChanged() || m_butterfly->changed() )
{
debugLog() << "Data changed";
m_dataChanged.set( false );
......@@ -450,6 +450,7 @@ void WMEEGView::closeCustomWidget()
m_widget->getViewer()->getView()->getEventHandlers().remove( m_handler );
}
// TODO(wiebel): use unique names here
WKernel::getRunningKernel()->getGui()->closeCustomWidget( getName() );
m_widget.reset(); // forces need call of destructor
}
......@@ -473,7 +474,10 @@ void WMEEGView::redraw()
}
// reset event position
m_event->set( boost::shared_ptr< WEEGEvent >( new WEEGEvent ) );
if( !m_butterfly->changed(true) )
{
m_event->set( boost::shared_ptr< WEEGEvent >( new WEEGEvent ) );
}
if( m_eeg.get() && m_eeg->getNumberOfSegments() > 0 )
{
......
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