mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-06 01:15:24 +00:00
If there is an inset at cursor, connect the dialog with that, not the containing one
Fixes: #8716 ("minipage within minipage" Settings bug) This is a potential candidate for branch, but only after some more testing.
This commit is contained in:
parent
0f9c2b4f04
commit
7e8c43a904
@ -219,11 +219,23 @@ bool Dialog::isVisibleView() const
|
|||||||
|
|
||||||
Inset const * Dialog::inset(InsetCode code) const
|
Inset const * Dialog::inset(InsetCode code) const
|
||||||
{
|
{
|
||||||
|
// ins: the innermost inset of the type we look for
|
||||||
|
// that contains the cursor
|
||||||
Inset * ins = bufferview()->cursor().innerInsetOfType(code);
|
Inset * ins = bufferview()->cursor().innerInsetOfType(code);
|
||||||
if (!ins)
|
// next: a potential inset at cursor position
|
||||||
ins = bufferview()->cursor().nextInset();
|
Inset * next = bufferview()->cursor().nextInset();
|
||||||
if (!ins || ins->lyxCode() != code)
|
// Check if next is of the type we look for
|
||||||
return 0;
|
if (next)
|
||||||
|
if (next->lyxCode() != code)
|
||||||
|
next = 0;
|
||||||
|
if (ins) {
|
||||||
|
// prefer next if it is of the requested type (bug 8716)
|
||||||
|
if (next)
|
||||||
|
ins = next;
|
||||||
|
} else
|
||||||
|
// no containing inset of requested type
|
||||||
|
// use next (which might also be 0)
|
||||||
|
ins = next;
|
||||||
return ins;
|
return ins;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,6 +64,8 @@ What's new
|
|||||||
* USER INTERFACE
|
* USER INTERFACE
|
||||||
|
|
||||||
- Fix automatic insertion of longtable captions (bug 9692).
|
- Fix automatic insertion of longtable captions (bug 9692).
|
||||||
|
|
||||||
|
- Fix setting of nested minipage via the dialog (bug 8716).
|
||||||
|
|
||||||
|
|
||||||
* INTERNALS
|
* INTERNALS
|
||||||
|
Loading…
Reference in New Issue
Block a user