mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Don't allow captions in non-floating listings
It was possible to insert a caption in a listing not marked as floating. This didn't cause errors but the caption simply was disappearing in the output.
This commit is contained in:
parent
48144c474b
commit
fd0756141c
@ -418,7 +418,8 @@ bool InsetListings::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
return true;
|
||||
case LFUN_CAPTION_INSERT: {
|
||||
// the inset outputs at most one caption
|
||||
if (params().isInline() || getCaptionInset()) {
|
||||
if (params().isInline() || !params().isFloat()
|
||||
|| getCaptionInset()) {
|
||||
status.setEnabled(false);
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user