Fix crash when using add circular string by radius tool

This commit is contained in:
Nyall Dawson 2016-07-05 11:42:59 +10:00
parent f9b02307f1
commit 9139872c9e
3 changed files with 13 additions and 5 deletions

View File

@ -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
@ -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:

View File

@ -69,8 +69,7 @@ void QgsUserInputDockWidget::widgetDestroyed( QObject *obj )
{
i.value()->deleteLater();
}
mWidgetList.remove( i.key() );
++i;
i = mWidgetList.erase( i );
}
}
}

View File

@ -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: