Skip to content

Commit

Permalink
Fix crash when using add circular string by radius tool
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jul 5, 2016
1 parent f9b0230 commit 9139872
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
11 changes: 9 additions & 2 deletions python/gui/qgsuserinputdockwidget.sip
@@ -1,4 +1,9 @@

/** \ingroup gui
* @brief The QgsUserInputDockWidget class is a dock widget that shall be used to display widgets for user inputs.
* It can be used by map tools, plugins, etc.
* Several widgets can be displayed at once, they will be separated by a separator. Widgets will be either layout horizontally or vertically.
* The dock is automatically hidden if it contains no widget.
*/
class QgsUserInputDockWidget : QDockWidget
{
%TypeHeaderCode
Expand All @@ -9,7 +14,9 @@ class QgsUserInputDockWidget : QDockWidget
QgsUserInputDockWidget( QWidget* parent /TransferThis/ = 0 );
~QgsUserInputDockWidget();

//! add a widget to be displayed in the dock
/** Add a widget to be displayed in the dock.
* @param widget widget to add. Ownership is not transferred.
*/
void addUserInputWidget( QWidget* widget );

protected:
Expand Down
3 changes: 1 addition & 2 deletions src/gui/qgsuserinputdockwidget.cpp
Expand Up @@ -69,8 +69,7 @@ void QgsUserInputDockWidget::widgetDestroyed( QObject *obj )
{
i.value()->deleteLater();
}
mWidgetList.remove( i.key() );
++i;
i = mWidgetList.erase( i );
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion src/gui/qgsuserinputdockwidget.h
Expand Up @@ -38,7 +38,9 @@ class GUI_EXPORT QgsUserInputDockWidget : public QgsDockWidget
QgsUserInputDockWidget( QWidget* parent = nullptr );
~QgsUserInputDockWidget();

//! add a widget to be displayed in the dock
/** Add a widget to be displayed in the dock.
* @param widget widget to add. Ownership is not transferred.
*/
void addUserInputWidget( QWidget* widget );

protected:
Expand Down

0 comments on commit 9139872

Please sign in to comment.