Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Do not register QgsFilterLineEdit's child widgets as QgsOptionsDialog…
…HighlightWidget
  • Loading branch information
github-actions[bot] authored and nyalldawson committed Dec 9, 2020
1 parent 6c61239 commit d136336
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/gui/qgsoptionsdialoghighlightwidget.cpp
Expand Up @@ -24,6 +24,7 @@

#include "qgsoptionsdialoghighlightwidget.h"
#include "qgsmessagebaritem.h"
#include "qgsfilterlineedit.h"

#include "qgsoptionsdialoghighlightwidgetsimpl.h"

Expand All @@ -41,7 +42,9 @@ QgsOptionsDialogHighlightWidget *QgsOptionsDialogHighlightWidget::createWidget(
while ( ( parent = parent->parentWidget() ) )
{
// do not register message bar content, items disappear and causes QGIS to crash
if ( qobject_cast< QgsMessageBarItem * >( parent ) )
// do not register QgsFilterLineEdit's child widgets, the clear button might be deleted
if ( qobject_cast< QgsMessageBarItem * >( parent ) ||
qobject_cast< QgsFilterLineEdit * >( parent ) )
{
// return invalid widget
return nullptr;
Expand Down

0 comments on commit d136336

Please sign in to comment.