mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-13 17:20:55 +00:00
* qt_helpers.cpp:
- fix function Length lengthFromWidgets. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@28113 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
005e49c5da
commit
b3141282ee
@ -92,7 +92,14 @@ Length widgetsToLength(QLineEdit const * input, QComboBox const * combo)
|
||||
if (isValidGlueLength(fromqstr(length)))
|
||||
return Length(fromqstr(length));
|
||||
|
||||
Length::UNIT const unit = unitFromString(fromqstr(combo->currentText()));
|
||||
Length::UNIT unit;
|
||||
QString const item = combo->currentText();
|
||||
for (int i = 0; i < num_units; i++) {
|
||||
if (qt_(lyx::unit_name_gui[i]) == item) {
|
||||
unit = unitFromString(unit_name[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return Length(length.toDouble(), unit);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user