Image inspector has some issues:

*) When autoscale is turned on, size and scale values are not updated neither are disabled
*) Lock aspect ratio does not work
*) mm/sp size check box does not update size values not size units of measure

Fixed by:

1) Sync-ing the enum at the beginning of 	inspectorimage.cpp with iList items
2) Adding a few extra calls to InspectorBase::valueChanged() for commands which change two values at the same time
This commit is contained in:
Maurizio M. Gavioli 2013-08-05 23:35:51 +02:00
parent 2c67b7bc60
commit e335dd04ab

View file

@ -19,7 +19,8 @@
namespace Ms { namespace Ms {
enum { enum {
AUTOSCALE, SIZE_W, SIZE_H, SCALE_W, SCALE_H, COLOR, VISIBLE, OFF_X, OFF_Y, // Element controls
AUTOSCALE, SIZE_W, SIZE_H, SCALE_W, SCALE_H, // Image controls
LOCK_RATIO, SIZE_IS_SPATIUM LOCK_RATIO, SIZE_IS_SPATIUM
}; };
@ -114,6 +115,7 @@ void InspectorImage::valueChanged(int idx)
b2->blockSignals(true); b2->blockSignals(true);
b2->setValue(h); b2->setValue(h);
b2->blockSignals(false); b2->blockSignals(false);
InspectorBase::valueChanged(SIZE_H);
} }
updateScaleFromSize(QSizeF(b1->value(), b2->value())); updateScaleFromSize(QSizeF(b1->value(), b2->value()));
} }
@ -125,6 +127,7 @@ void InspectorImage::valueChanged(int idx)
b1->blockSignals(true); b1->blockSignals(true);
b1->setValue(w); b1->setValue(w);
b1->blockSignals(false); b1->blockSignals(false);
InspectorBase::valueChanged(SIZE_W);
} }
updateScaleFromSize(QSizeF(b1->value(), b2->value())); updateScaleFromSize(QSizeF(b1->value(), b2->value()));
} }
@ -142,6 +145,7 @@ void InspectorImage::valueChanged(int idx)
b4->blockSignals(true); b4->blockSignals(true);
b4->setValue(w); b4->setValue(w);
b4->blockSignals(false); b4->blockSignals(false);
InspectorBase::valueChanged(SCALE_H);
} }
updateSizeFromScale(QSizeF(b3->value(), b4->value())); updateSizeFromScale(QSizeF(b3->value(), b4->value()));
} }
@ -159,6 +163,7 @@ void InspectorImage::valueChanged(int idx)
b3->blockSignals(true); b3->blockSignals(true);
b3->setValue(w); b3->setValue(w);
b3->blockSignals(false); b3->blockSignals(false);
InspectorBase::valueChanged(SCALE_W);
} }
updateSizeFromScale(QSizeF(b3->value(), b4->value())); updateSizeFromScale(QSizeF(b3->value(), b4->value()));
} }