Skip to content
Permalink
Browse files

put message in log instead of message box

  • Loading branch information
signedav committed Jan 8, 2019
1 parent 666f959 commit 37eec198a89fcf4cfe2200ab071defecc06534f8
@@ -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() );

/**

0 comments on commit 37eec19

Please sign in to comment.
You can’t perform that action at this time.