mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-28 06:49:43 +00:00
QTabularDialog: fix width input (bug 1156)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7286 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
cd12251e27
commit
bd76214fd4
@ -1,3 +1,8 @@
|
||||
2003-07-15 Juergen Spitzmueller <j.spitzmueller@gmx.de>
|
||||
|
||||
* QTabular.C:
|
||||
* QTabularDialog.C: handle clever width input (bug 1156)
|
||||
|
||||
2003-07-15 John Levon <levon@movementarian.org>
|
||||
|
||||
* QMathDialog.C: use widget(i) not visibleWidget() due to
|
||||
|
@ -162,13 +162,13 @@ void QTabular::update_contents()
|
||||
dialog_->specialAlignmentED->setEnabled(!isReadonly);
|
||||
|
||||
LyXLength::UNIT default_unit = controller().useMetricUnits() ? LyXLength::CM : LyXLength::IN;
|
||||
if (!pwidth.zero()) {
|
||||
dialog_->widthED->setText(toqstr(tostr(pwidth.value())));
|
||||
dialog_->widthUnit->setCurrentItem(pwidth.unit());
|
||||
} else {
|
||||
dialog_->widthED->setText("");
|
||||
dialog_->widthUnit->setCurrentItem(default_unit);
|
||||
}
|
||||
|
||||
string colwidth;
|
||||
if (!pwidth.zero())
|
||||
colwidth = pwidth.asString();
|
||||
lengthToWidgets(dialog_->widthED, dialog_->widthUnit,
|
||||
colwidth, default_unit);
|
||||
|
||||
dialog_->widthED->setEnabled(!isReadonly);
|
||||
dialog_->widthUnit->setEnabled(!isReadonly);
|
||||
|
||||
|
@ -112,9 +112,7 @@ void QTabularDialog::specialAlignment_changed()
|
||||
void QTabularDialog::width_changed()
|
||||
{
|
||||
form_->changed();
|
||||
string const width =
|
||||
LyXLength(widthED->text().toDouble(),
|
||||
widthUnit->currentLengthItem()).asString();
|
||||
string const width = widgetsToLength(widthED, widthUnit);
|
||||
form_->controller().setWidth(width);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user