Skip to content
Permalink
Browse files

Fix logic in QgsUserInputWidget which incorrectly deletes other widge…

…ts whenever one existing widget is deleted
  • Loading branch information
github-actions authored and nyalldawson committed Oct 28, 2020
1 parent 497e313 commit c1adeb0a7c9b275df099196ea58ffc4b3a8ba631
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/gui/qgsuserinputwidget.cpp
@@ -75,14 +75,14 @@ void QgsUserInputWidget::widgetDestroyed( QObject *obj )
if ( obj->isWidgetType() )
{
QWidget *w = qobject_cast<QWidget *>( obj );
QMap<QWidget *, QFrame *>::iterator i = mWidgetList.find( w );
while ( i != mWidgetList.end() )
auto it = mWidgetList.find( w );
if ( it != mWidgetList.end() )
{
if ( auto *lValue = i.value() )
if ( QFrame *frame = it.value() )
{
lValue->deleteLater();
frame->deleteLater();
}
i = mWidgetList.erase( i );
mWidgetList.erase( it );
}
}
if ( mWidgetList.count() == 0 )

0 comments on commit c1adeb0

Please sign in to comment.
You can’t perform that action at this time.