Skip to content

Commit

Permalink
Add help button to layer notes dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
DelazJ authored and nyalldawson committed Jul 25, 2021
1 parent d2b1b97 commit 402cf11
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/app/qgslayernotesmanager.cpp
Expand Up @@ -18,6 +18,7 @@
#include "qgsmaplayer.h"
#include "qgsrichtexteditor.h"
#include "qgsgui.h"
#include "qgshelp.h"
#include "qgsproject.h"
#include <QDialogButtonBox>
#include <QPushButton>
Expand Down Expand Up @@ -45,9 +46,13 @@ QgsLayerNotesDialog::QgsLayerNotesDialog( QWidget *parent )
mEditor = new QgsRichTextEditor();
layout->addWidget( mEditor );

QDialogButtonBox *buttonBox = new QDialogButtonBox( QDialogButtonBox::Save | QDialogButtonBox::Cancel );
QDialogButtonBox *buttonBox = new QDialogButtonBox( QDialogButtonBox::Save | QDialogButtonBox::Help | QDialogButtonBox::Cancel );
connect( buttonBox->button( QDialogButtonBox::Save ), &QPushButton::clicked, this, &QDialog::accept );
connect( buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject );
connect( buttonBox, &QDialogButtonBox::helpRequested, this, [ = ]
{
QgsHelp::openHelp( QStringLiteral( "introduction/general_tools.html#layer-notes" ) );
} );
layout->addWidget( buttonBox );

layout->setContentsMargins( 3, 0, 3, 3 );
Expand Down

0 comments on commit 402cf11

Please sign in to comment.