Skip to content
Permalink
Browse files

fix #4103

  • Loading branch information
jef-n committed May 29, 2013
1 parent cca0003 commit 798d17b12a80f2c73b461ce3e23e40ee86841a08
Showing with 8 additions and 20 deletions.
  1. +8 −20 src/app/qgsmaptoolvertexedit.cpp
@@ -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>

@@ -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.
You can’t perform that action at this time.