Skip to content

Commit

Permalink
display and allow editing of simplify tolerance value (fix #7515)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Apr 5, 2013
1 parent 9b83d1a commit 6c2f8d1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/app/qgsmaptoolsimplify.cpp
Expand Up @@ -33,6 +33,10 @@ QgsSimplifyDialog::QgsSimplifyDialog( QWidget* parent )
setupUi( this );
connect( horizontalSlider, SIGNAL( valueChanged( int ) ),
this, SLOT( valueChanged( int ) ) );
connect( horizontalSlider, SIGNAL( valueChanged( int ) ),
spinBox, SLOT( setValue( int ) ) );
connect( spinBox, SIGNAL( valueChanged( int ) ),
horizontalSlider, SLOT( setValue( int ) ) );
connect( okButton, SIGNAL( clicked() ),
this, SLOT( simplify() ) );

Expand All @@ -55,7 +59,8 @@ void QgsSimplifyDialog::setRange( int minValue, int maxValue )

horizontalSlider->setMinimum(( minValue - 1 < 0 ? 0 : minValue - 1 ) );// -1 for count with minimum tolerance end caused by double imprecision
horizontalSlider->setMaximum( maxValue );

qDebug()

This comment has been minimized.

Copy link
@torsti

torsti Apr 5, 2013

Should be qDebug();

spinBox->setRange( horizontalSlider->minimum(), horizontalSlider->maximum() );
}


Expand Down
6 changes: 6 additions & 0 deletions src/ui/qgssimplifytolerancedialog.ui
Expand Up @@ -26,8 +26,14 @@
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="tickPosition">
<enum>QSlider::TicksBelow</enum>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox"/>
</item>
<item>
<widget class="QPushButton" name="okButton">
<property name="text">
Expand Down

0 comments on commit 6c2f8d1

Please sign in to comment.