Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
put message in log instead of message box
- Loading branch information
|
@@ -125,7 +125,9 @@ items, i.e. it does not fetch children. |
|
|
:param uri: item uri |
|
|
:param index: the current index of the parent (to search for children) |
|
|
|
|
|
:return: model index, invalid if item not found * |
|
|
:return: model index, invalid if item not found |
|
|
|
|
|
.. versionadded:: 3.6 |
|
|
%End |
|
|
|
|
|
void connectItem( QgsDataItem *item ) /Deprecated/; |
|
|
|
@@ -23,6 +23,7 @@ |
|
|
#include "qgsnative.h" |
|
|
#include "qgisapp.h" |
|
|
#include "qgsmessagebar.h" |
|
|
#include "qgsmessagelog.h" |
|
|
#include "qgsnewnamedialog.h" |
|
|
#include "qgsbrowsermodel.h" |
|
|
#include "qgsbrowserdockwidget_p.h" |
|
@@ -484,7 +485,7 @@ void QgsLayerItemGuiProvider::deleteLayers( const QStringList &itemPaths ) |
|
|
QgsLayerItem *item = qobject_cast<QgsLayerItem *>( QgisApp::instance()->browserModel()->dataItem( QgisApp::instance()->browserModel()->findUri( itemPath ) ) ); |
|
|
if ( !item ) |
|
|
{ |
|
|
QMessageBox::information( QgisApp::instance(), tr( "Delete Layer" ), tr( "Item with path %1 not found anymore." ).arg( itemPath ) ); |
|
|
QgsMessageLog::logMessage( tr( "Item with path %1 no longer exists." ).arg( itemPath ) ); |
|
|
return; |
|
|
} |
|
|
if ( !item->deleteLayer() ) |
|
|
|
@@ -141,7 +141,10 @@ class CORE_EXPORT QgsBrowserModel : public QAbstractItemModel |
|
|
* items, i.e. it does not fetch children. |
|
|
* \param uri item uri |
|
|
* \param index the current index of the parent (to search for children) |
|
|
* \returns model index, invalid if item not found */ |
|
|
* \returns model index, invalid if item not found |
|
|
* |
|
|
* \since QGIS 3.6 |
|
|
*/ |
|
|
QModelIndex findUri( const QString &uri, QModelIndex index = QModelIndex() ); |
|
|
|
|
|
/** |
|
|