mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-13 12:31:52 +02:00
fix deleting controls
This commit is contained in:
parent
ee78eb52dd
commit
5df5938ec1
@ -157,8 +157,11 @@ void DynamicControlList::removeControl()
|
||||
DynamicControlWidget* w = qobject_cast<DynamicControlWidget*>( sender() );
|
||||
m_layout->removeWidget( w );
|
||||
m_controls.removeAll( w );
|
||||
|
||||
m_generator->removeControl( w->control() );
|
||||
delete w;
|
||||
|
||||
|
||||
m_controls.last()->setShowCollapseButton( true );
|
||||
m_controls.last()->setShowPlusButton( true );
|
||||
m_controls.last()->setShowMinusButton( false );
|
||||
|
@ -60,6 +60,12 @@ Tomahawk::GeneratorInterface::setControls( const QList< Tomahawk::dyncontrol_ptr
|
||||
m_controls = controls;
|
||||
}
|
||||
|
||||
void Tomahawk::GeneratorInterface::removeControl(const Tomahawk::dyncontrol_ptr& control)
|
||||
{
|
||||
m_controls.removeAll( control );
|
||||
}
|
||||
|
||||
|
||||
Tomahawk::dyncontrol_ptr
|
||||
Tomahawk::GeneratorInterface::createControl(const QString& type)
|
||||
{
|
||||
|
@ -75,7 +75,8 @@ public:
|
||||
void addControl( const dyncontrol_ptr& control );
|
||||
void clearControls();
|
||||
void setControls( const QList< dyncontrol_ptr>& controls );
|
||||
|
||||
void removeControl( const dyncontrol_ptr& control );
|
||||
|
||||
signals:
|
||||
void generated( const QList< Tomahawk::query_ptr>& queries );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user