[Kst] extragear/graphics/kst/src/libkstapp
Barth Netterfield
netterfield at astro.utoronto.ca
Wed Sep 27 01:18:15 CEST 2006
SVN commit 588802 by netterfield:
BUG:
A locked object was being unlocked. This should be back-ported to
1.3.1.
Also, the error messages were odd, bad grammer, or confusing. This fixes
that (but should not be pack ported to 1.3.1.)
Sorry about the mixed commit.
M +15 -7 kstimagedialog_i.cpp
--- trunk/extragear/graphics/kst/src/libkstapp/kstimagedialog_i.cpp #588801:588802
@@ -279,8 +279,8 @@
if (_contourOnlyDirty || _colorOnlyDirty || _colorAndContourDirty) {
double lowerZDouble, upperZDouble;
if (!checkParameters(lowerZDouble, upperZDouble)) {
- KMessageBox::sorry(this, i18n("Image type was changed: Lower Z threshold cannot be higher than Upper Z threshold."));
- pMatrix->unlock();
+ //KMessageBox::sorry(this, i18n("Image type was changed: Lower Z threshold cannot be higher than Upper Z threshold."));
+ //pMatrix->unlock();
imPtr->unlock();
return false;
}
@@ -355,8 +355,8 @@
// check parameters for color map
if (imPtr->hasColorMap()) {
if (pLowerZ > pUpperZ) {
- KMessageBox::sorry(this, i18n("The Lower Z threshold cannot be higher than Upper Z threshold."));
- pMatrix->unlock();
+ //KMessageBox::sorry(this, i18n("The Lower Z threshold cannot be higher than Upper Z threshold."));
+ //pMatrix->unlock();
imPtr->unlock();
return false;
}
@@ -547,11 +547,19 @@
lowerZDouble = _w->_lowerZ->text().toDouble(&ok1);
upperZDouble = _w->_upperZ->text().toDouble(&ok2);
if (!(ok1 && ok2)) {
- KMessageBox::sorry(this, i18n("The upper and lower thresholds are not valid. Enter valid decimal numbers for the thresholds."));
+ if (ok1 || ok2) {
+ if (ok1) {
+ KMessageBox::sorry(this, i18n("The upper threshold is not a valid decimal number."));
+ } else {
+ KMessageBox::sorry(this, i18n("The lower threshold is not a valid decimal number."));
+ }
+ } else {
+ KMessageBox::sorry(this, i18n("The upper and lower thresholds are not valid decimal numbers."));
+ }
return false;
}
- if (lowerZDouble > upperZDouble) {
- KMessageBox::sorry(this, i18n("The lower threshold cannot be greater than the upper threshold."));
+ if (lowerZDouble >= upperZDouble) {
+ KMessageBox::sorry(this, i18n("The upper threshold must be greater than the lower threshold."));
return false;
}
}
More information about the Kst
mailing list