Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Ensure project is dirtied when layer notes are modified
  • Loading branch information
nyalldawson committed Jun 23, 2021
1 parent 764dedc commit b7ef0b4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/app/qgsapplayertreeviewmenuprovider.cpp
Expand Up @@ -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 );
}
Expand Down
2 changes: 2 additions & 0 deletions src/app/qgslayernotesmanager.cpp
Expand Up @@ -18,6 +18,7 @@
#include "qgsmaplayer.h"
#include "qgsrichtexteditor.h"
#include "qgsgui.h"
#include "qgsproject.h"
#include <QDialogButtonBox>
#include <QPushButton>

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

Expand Down

0 comments on commit b7ef0b4

Please sign in to comment.