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 764dedc commit b7ef0b41c327e559fb6815df83bad579beb9f1cb
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 b7ef0b4

Please sign in to comment.