Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix #4103
  • Loading branch information
jef-n committed May 29, 2013
1 parent cca0003 commit 798d17b
Showing 1 changed file with 8 additions and 20 deletions.
28 changes: 8 additions & 20 deletions src/app/qgsmaptoolvertexedit.cpp
Expand Up @@ -23,8 +23,10 @@
#include "qgsmaptopixel.h"
#include "qgsproject.h"
#include "qgscursors.h"
#include "qgsmessagebar.h"
#include "qgisapp.h"

#include <QCursor>
#include <QMessageBox>
#include <QSettings>
#include <QPixmap>

Expand All @@ -40,23 +42,9 @@ QgsMapToolVertexEdit::~QgsMapToolVertexEdit()

void QgsMapToolVertexEdit::displaySnapToleranceWarning()
{
QSettings myQSettings;
QString myQSettingsLabel = "/UI/displaySnapWarning";
bool displaySnapWarning = myQSettings.value( myQSettingsLabel, true ).toBool();

if ( displaySnapWarning )
{
QgsMessageViewer* m = new QgsMessageViewer( 0 );
m->setWindowTitle( tr( "Snap tolerance" ) );
m->setCheckBoxText( tr( "Don't show this message again" ) );
m->setCheckBoxVisible( true );
m->setCheckBoxQSettingsLabel( myQSettingsLabel );
m->setMessageAsHtml( "<p>" +
tr( "Could not snap segment." ) +
"</p><p>" +
tr( "Have you set the tolerance in "
"Settings > Project Properties > General?" ) +
"</p>" );
m->exec();
}
QgisApp::instance()->messageBar()->pushMessage(
tr( "Snap tolerance" ),
tr( "Could not snap segment. Have you set the tolerance in Settings > Snapping Options?" ),
QgsMessageBar::INFO,
QgisApp::instance()->messageTimeout() );
}

0 comments on commit 798d17b

Please sign in to comment.