This commit is contained in:
Nyall Dawson 2017-09-20 18:45:59 +10:00
parent ef97063029
commit a67dab52d2
3 changed files with 5 additions and 5 deletions

View File

@ -157,8 +157,8 @@ Create new data item.
virtual bool handleDoubleClick(); virtual bool handleDoubleClick();
%Docstring %Docstring
Called when a user double clicks on the item. Subclasses should return true Called when a user double clicks on the item. Subclasses should return true
if they have implemented a double click handler and do not want the default if they have implemented a double-click handler and do not want the default
double click behaviour for items. double-click behavior for items.
.. versionadded:: 3.0 .. versionadded:: 3.0
:rtype: bool :rtype: bool
%End %End

View File

@ -158,8 +158,8 @@ class CORE_EXPORT QgsDataItem : public QObject
/** /**
* Called when a user double clicks on the item. Subclasses should return true * Called when a user double clicks on the item. Subclasses should return true
* if they have implemented a double click handler and do not want the default * if they have implemented a double-click handler and do not want the default
* double click behaviour for items. * double-click behavior for items.
* \since QGIS 3.0 * \since QGIS 3.0
*/ */
virtual bool handleDoubleClick(); virtual bool handleDoubleClick();

View File

@ -164,7 +164,7 @@ void QgsBrowserDockWidget::itemDoubleClicked( const QModelIndex &index )
if ( item->handleDoubleClick() ) if ( item->handleDoubleClick() )
return; return;
else else
addLayerAtIndex( index ); // default double click handler addLayerAtIndex( index ); // default double-click handler
} }
void QgsBrowserDockWidget::showContextMenu( QPoint pt ) void QgsBrowserDockWidget::showContextMenu( QPoint pt )