mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-18 21:45:24 +00:00
branch: Fix bug 5797: http://bugzilla.lyx.org/show_bug.cgi?id=5797.
GetStatus of an InsetCollapsable asserts for unhandled commands. When you add a command to the context menu of an InsetCollapsable of which the getStatus method does not handle this command, an assertion will be raised. This happens when getStatus doesn't handle a command it is forwarded to text::getStatus which asserts because cur.text() is the text the inset is in, while this is the text of the inset. So, we only dispatch to text_ if the cursor is inside the text_. This is not the case for e.g. context menus. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@28591 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
7399607f0e
commit
2f695eb436
@ -271,7 +271,11 @@ bool InsetText::getStatus(Cursor & cur, FuncRequest const & cmd,
|
|||||||
status.setEnabled(allowParagraphCustomization());
|
status.setEnabled(allowParagraphCustomization());
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
return text_.getStatus(cur, cmd, status);
|
// Dispatch only to text_ if the cursor is inside
|
||||||
|
// the text_. It is not for context menus (bug 5797).
|
||||||
|
if (cur.text() == &text_)
|
||||||
|
return text_.getStatus(cur, cmd, status);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -191,7 +191,12 @@ What's new
|
|||||||
This fixes a crash when attempting to insert plain text (bug 5671).
|
This fixes a crash when attempting to insert plain text (bug 5671).
|
||||||
|
|
||||||
- Fix the synchronisation of insets when they are shown in two different
|
- Fix the synchronisation of insets when they are shown in two different
|
||||||
views. This could also have lead to an assertion (bug 4346).
|
views. This could also have lead to an assertion (bug 4346).
|
||||||
|
|
||||||
|
- Fix an assertion when the status of a command in the context menu of
|
||||||
|
an InsetCollapsable is requested which is not handled by the inset.
|
||||||
|
This might happen when the user modifies the ui or when the right
|
||||||
|
mouse button is dragged (bug 5797).
|
||||||
|
|
||||||
- Speed up editing with Outliner open with Qt >= 4.3. This should
|
- Speed up editing with Outliner open with Qt >= 4.3. This should
|
||||||
especially pay off on the Mac, if the Outliner shows as a drawer
|
especially pay off on the Mac, if the Outliner shows as a drawer
|
||||||
|
Loading…
x
Reference in New Issue
Block a user