Kaydet (Commit) 9e0a099f authored tarafından Caolán McNamara's avatar Caolán McNamara

reformat when the unit changes

Change-Id: I2252a5bc4c3b495c35b9d5672a272362646ebbe8
Reviewed-on: https://gerrit.libreoffice.org/63426
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 32a8c55c
......@@ -824,11 +824,7 @@ public:
FieldUnit get_unit() const { return m_eSrcUnit; }
void set_unit(FieldUnit eUnit)
{
m_eSrcUnit = eUnit;
update_width_chars();
}
void set_unit(FieldUnit eUnit);
int convert_value_to(int nValue, FieldUnit eValueUnit) const
{
......
......@@ -250,6 +250,18 @@ namespace weld
m_xSpinButton->set_digits(digits);
set_increments(step, page, m_eSrcUnit);
set_value(value, m_eSrcUnit);
update_width_chars();
}
void MetricSpinButton::set_unit(FieldUnit eUnit)
{
int step, page;
get_increments(step, page, m_eSrcUnit);
int value = get_value(m_eSrcUnit);
m_eSrcUnit = eUnit;
set_increments(step, page, m_eSrcUnit);
set_value(value, m_eSrcUnit);
update_width_chars();
}
int MetricSpinButton::ConvertValue(int nValue, FieldUnit eInUnit, FieldUnit eOutUnit) const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment