// add scale item
widthUnitCO->insertItem(0, qt_("Scale%"), "scale");
+
+ // remove all units from bb that depend on font or other dimensions
+ // we cannot use these, since we need to compare against absolute
+ // values from the image file.
+ xlUnitCO->noPercents();
+ xlUnitCO->removeFontDependent();
+ xrUnitCO->noPercents();
+ xrUnitCO->removeFontDependent();
+ ytUnitCO->noPercents();
+ ytUnitCO->removeFontDependent();
+ ybUnitCO->noPercents();
+ ybUnitCO->removeFontDependent();
}
}
+void LengthCombo::removeFontDependent()
+{
+ removeUnit(Length::EM);
+ removeUnit(Length::EX);
+ removeUnit(Length::MU);
+}
+
+
void LengthCombo::removeUnit(lyx::Length::UNIT unit)
{
QString const val = lyx::toqstr(lyx::stringFromUnit(unit));
virtual void setEnabled(bool b);
/// use the %-items?
void noPercents();
+ /// Remove EM, EX and MU units
+ void removeFontDependent();
/// remove a unit from the combo
void removeUnit(lyx::Length::UNIT unit);
/// add a unit to the combo