Skip to content

Commit e51df5c

Browse files
author
mhugent
committedJan 2, 2010
Fix double validator in composer map widget (part of ticket #2252)
git-svn-id: http://svn.osgeo.org/qgis/trunk@12667 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 4f94862 commit e51df5c

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed
 

‎src/app/composer/qgscomposermapwidget.cpp

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,15 @@ QgsComposerMapWidget::QgsComposerMapWidget( QgsComposerMap* composerMap ): QWidg
2929
//add widget for general composer item properties
3030
QgsComposerItemWidget* itemPropertiesWidget = new QgsComposerItemWidget( this, composerMap );
3131
toolBox->addItem( itemPropertiesWidget, tr( "General options" ) );
32-
QDoubleValidator v( 0 );
3332

34-
mWidthLineEdit->setValidator( &v );
35-
mHeightLineEdit->setValidator( &v );
36-
mScaleLineEdit->setValidator( &v );
33+
mWidthLineEdit->setValidator( new QDoubleValidator( mWidthLineEdit ) );
34+
mHeightLineEdit->setValidator( new QDoubleValidator( mHeightLineEdit ) );
35+
mScaleLineEdit->setValidator( new QDoubleValidator( mScaleLineEdit ) );
3736

38-
mXMinLineEdit->setValidator( &v );
39-
mXMaxLineEdit->setValidator( &v );
40-
mYMinLineEdit->setValidator( &v );
41-
mYMaxLineEdit->setValidator( &v );
37+
mXMinLineEdit->setValidator( new QDoubleValidator( mXMinLineEdit ) );
38+
mXMaxLineEdit->setValidator( new QDoubleValidator( mXMaxLineEdit ) );
39+
mYMinLineEdit->setValidator( new QDoubleValidator( mYMinLineEdit ) );
40+
mYMaxLineEdit->setValidator( new QDoubleValidator( mYMaxLineEdit ) );
4241

4342
blockAllSignals( true );
4443
mPreviewModeComboBox->insertItem( 0, tr( "Cache" ) );

0 commit comments

Comments
 (0)
Please sign in to comment.