Uwe Stöhr schrieb:

There is a serious problem for all current dialogs:
You can set dialog elements to disables state, but whenever you press the apply button, this is overwritten and all elements are set bach to enabled state.

I found the reason for this now. It's in ButtonController:

void ButtonController::refreshReadOnly() const
        if (read_only_.empty())
                return;
        ...
                setWidgetEnabled(*iter, enable);

void ButtonController::setWidgetEnabled(QWidget * obj, bool enabled) const
        if (QLineEdit * le = qobject_cast<QLineEdit*>(obj))
                le->setReadOnly(!enabled);
        else
                obj->setEnabled(enabled);


So every widget that is connected to readonly is set to enabled state when 
pressing the apply
button. This is in my opinion a bug and furthermore a regression to LyX 1.5.1 
where the
setWidgetEnabled is not used on refresh read only.

Who has implemented this?

Note that this bug affects every dialog with widgets that could be in disabled 
state after pressing
apply or OK. This for example the box dialog.

So if nobody complains, I'll remove refreshReadOnly() from 
ButtonController::setReadOnly to fix the
regression.

regards Uwe

Reply via email to