Created
August 21, 2013 10:24
-
-
Save slarosa/6292807 to your computer and use it in GitHub Desktop.
QgsField::operator==
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/app/qgsaddattrdialog.cpp b/src/app/qgsaddattrdialog.cpp | |
index c21e204..b32cb00 100644 | |
--- a/src/app/qgsaddattrdialog.cpp | |
+++ b/src/app/qgsaddattrdialog.cpp | |
@@ -61,7 +61,7 @@ void QgsAddAttrDialog::on_mTypeBox_currentIndexChanged( int idx ) | |
mLength->setMinimum( mTypeBox->itemData( idx, Qt::UserRole + 2 ).toInt() ); | |
mLength->setMaximum( mTypeBox->itemData( idx, Qt::UserRole + 3 ).toInt() ); | |
- mLength->setVisible( mLength->minimum() < mLength->maximum() ); | |
+ mLength->setEnabled( mLength->minimum() < mLength->maximum() ); | |
if ( mLength->value() < mLength->minimum() ) | |
mLength->setValue( mLength->minimum() ); | |
if ( mLength->value() > mLength->maximum() ) | |
@@ -79,7 +79,7 @@ void QgsAddAttrDialog::setPrecisionMinMax() | |
int idx = mTypeBox->currentIndex(); | |
int minPrecType = mTypeBox->itemData( idx, Qt::UserRole + 4 ).toInt(); | |
int maxPrecType = mTypeBox->itemData( idx, Qt::UserRole + 5 ).toInt(); | |
- mPrec->setVisible( minPrecType < maxPrecType ); | |
+ mPrec->setEnabled( minPrecType < maxPrecType ); | |
if ( mPrec->isVisible() ) | |
{ | |
mPrec->setMinimum( minPrecType ); | |
diff --git a/src/core/qgsfield.cpp b/src/core/qgsfield.cpp | |
index 180c00c..93a9a9b 100644 | |
--- a/src/core/qgsfield.cpp | |
+++ b/src/core/qgsfield.cpp | |
@@ -43,7 +43,7 @@ QgsField::~QgsField() | |
bool QgsField::operator==( const QgsField& other ) const | |
{ | |
return (( mName == other.mName ) && ( mType == other.mType ) | |
- && ( mLength == other.mLength ) && ( mPrecision == other.mPrecision ) ); | |
+ && ( mPrecision == other.mPrecision ) ); | |
} | |
bool QgsField::operator!=( const QgsField& other ) const |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment