On 12/06/2010 12:39 PM, Jean-Marc Lasgouttes wrote:
In the aforementioned function, I read:
bool const lfun_ok = lyx::getStatus(FuncRequest(code,
argument)).enabled();
bool const read_only = buffer().isReadonly();
okPB->setEnabled(!synchronized_view && widget_ok && !read_only &&
valid_argument);
Question: why is it necessary to check for read only document, whereas
getStatus does it already? What about using lfun_ok instead?
I guess I didn't know at the time what getStatus was really checking. I
was just mimicking what is done in the ButtonController. Guess you are
right, this should be enough.
Abdel.