Allow deleting of the last sub plot and have nice visible drop targets

This commit is contained in:
Gaute Lindkvist
2019-10-29 08:53:14 +01:00
parent 089ca3d39d
commit 38e0b150ac
15 changed files with 350 additions and 119 deletions

View File

@@ -448,21 +448,7 @@ void RiuQwtPlotWidget::scheduleReplot()
//--------------------------------------------------------------------------------------------------
void RiuQwtPlotWidget::setWidgetState( RiuWidgetStyleSheet::StateTag widgetState )
{
// Set all existing dynamic properties to false
for ( QByteArray existingProperty : dynamicPropertyNames() )
{
setProperty( existingProperty, false );
}
// Set current property state to true
QString propertyName = RiuWidgetStyleSheet::propertyName( widgetState );
if ( !propertyName.isEmpty() )
{
setProperty( propertyName.toLatin1(), true );
}
// Trigger style update
m_plotStyleSheet.refreshWidget( this );
m_plotStyleSheet.setWidgetState( this, widgetState );
}
//--------------------------------------------------------------------------------------------------