Skip to content

Commit

Permalink
Connect the bookmark editor dialog to the user manual (#31795)
Browse files Browse the repository at this point in the history
  • Loading branch information
DelazJ authored and nirvn committed Sep 16, 2019
1 parent 2797e46 commit eedb3df
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/app/qgsbookmarkeditordialog.cpp
Expand Up @@ -26,6 +26,7 @@
#include "qgsprojectionselectiondialog.h"
#include "qgsproject.h"
#include "qgsmapcanvas.h"
#include "qgshelp.h"

QgsBookmarkEditorDialog::QgsBookmarkEditorDialog( QgsBookmark bookmark, bool inProject, QWidget *parent, QgsMapCanvas *mapCanvas )
: QDialog( parent )
Expand Down Expand Up @@ -57,6 +58,7 @@ QgsBookmarkEditorDialog::QgsBookmarkEditorDialog( QgsBookmark bookmark, bool inP

connect( mCrsSelector, &QgsProjectionSelectionWidget::crsChanged, this, &QgsBookmarkEditorDialog::crsChanged );
connect( buttonBox, &QDialogButtonBox::accepted, this, &QgsBookmarkEditorDialog::onAccepted );
connect( buttonBox, &QDialogButtonBox::helpRequested, this, &QgsBookmarkEditorDialog::showHelp );

mName->setFocus();
}
Expand All @@ -66,6 +68,11 @@ void QgsBookmarkEditorDialog::crsChanged( const QgsCoordinateReferenceSystem &cr
mExtentGroupBox->setOutputCrs( crs );
}

void QgsBookmarkEditorDialog::showHelp()
{
QgsHelp::openHelp( QStringLiteral( "introduction/general_tools.html#spatial-bookmarks" ) );
}

void QgsBookmarkEditorDialog::onAccepted()
{
QgsBookmark bookmark;
Expand Down
1 change: 1 addition & 0 deletions src/app/qgsbookmarkeditordialog.h
Expand Up @@ -54,6 +54,7 @@ class APP_EXPORT QgsBookmarkEditorDialog: public QDialog, private Ui::QgsBookmar

void crsChanged( const QgsCoordinateReferenceSystem &crs );
void onAccepted();
void showHelp();

private:

Expand Down
2 changes: 1 addition & 1 deletion src/ui/qgsbookmarkeditordialog.ui
Expand Up @@ -95,7 +95,7 @@
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Save</set>
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::Save</set>
</property>
</widget>
</item>
Expand Down

0 comments on commit eedb3df

Please sign in to comment.