Skip to content
Permalink
Browse files
Ensure project is dirtied when layer notes are modified
  • Loading branch information
nyalldawson committed Jun 23, 2021
1 parent d29c6ad commit 9fd1ddf3793d5924a7681ce7d6cb28463e5f043c
Showing with 5 additions and 0 deletions.
  1. +3 −0 src/app/qgsapplayertreeviewmenuprovider.cpp
  2. +2 −0 src/app/qgslayernotesmanager.cpp
@@ -689,7 +689,10 @@ QMenu *QgsAppLayerTreeViewMenuProvider::createContextMenu()
tr( "Remove Layer Notes" ),
tr( "Are you sure you want to remove all notes for the layer “%1”?" ).arg( layer->name() ),
QMessageBox::Yes | QMessageBox::No, QMessageBox::No ) == QMessageBox::Yes )
{
QgsLayerNotesUtils::removeNotes( layer );
QgsProject::instance()->setDirty( true );
}
} );
menu->addAction( notes );
}
@@ -18,6 +18,7 @@
#include "qgsmaplayer.h"
#include "qgsrichtexteditor.h"
#include "qgsgui.h"
#include "qgsproject.h"
#include <QDialogButtonBox>
#include <QPushButton>

@@ -30,6 +31,7 @@ void QgsLayerNotesManager::editLayerNotes( QgsMapLayer *layer, QWidget *parent )
if ( editor->exec() )
{
QgsLayerNotesUtils::setLayerNotes( layer, editor->notes() );
QgsProject::instance()->setDirty( true );
}
}

0 comments on commit 9fd1ddf

Please sign in to comment.