mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-26 06:15:16 +00:00
make display of group list only depend on existence of groups; move the addition of a separator to the ui file
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24941 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a94c091d9d
commit
703eca7670
@ -300,6 +300,7 @@ Menuset
|
|||||||
Item "Settings...|S" "next-inset-toggle"
|
Item "Settings...|S" "next-inset-toggle"
|
||||||
Separator
|
Separator
|
||||||
Item "Edit externally...|x" "inset-edit"
|
Item "Edit externally...|x" "inset-edit"
|
||||||
|
Separator
|
||||||
GraphicsGroups
|
GraphicsGroups
|
||||||
End
|
End
|
||||||
|
|
||||||
|
@ -639,21 +639,15 @@ void MenuDefinition::expandGraphicsGroups(BufferView const * bv)
|
|||||||
{
|
{
|
||||||
if (!bv)
|
if (!bv)
|
||||||
return;
|
return;
|
||||||
Cursor const & cur = bv->cursor();
|
|
||||||
Buffer const & buf = bv->buffer();
|
|
||||||
set<string> grp;
|
set<string> grp;
|
||||||
InsetGraphics::getGraphicsGroups(buf, grp);
|
InsetGraphics::getGraphicsGroups(bv->buffer(), grp);
|
||||||
set<string>::const_iterator it = grp.begin();
|
|
||||||
set<string>::const_iterator end = grp.end();
|
|
||||||
if (grp.empty())
|
if (grp.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
InsetGraphics * ins = InsetGraphics::getCurrentGraphicsInset(cur);
|
set<string>::const_iterator it = grp.begin();
|
||||||
if (!ins)
|
set<string>::const_iterator end = grp.end();
|
||||||
return;
|
add(MenuItem(MenuItem::Command, qt_("No Group"),
|
||||||
add(MenuItem(MenuItem::Separator));
|
FuncRequest(LFUN_SET_GRAPHICS_GROUP)));
|
||||||
if (!ins->getParams().groupId.empty())
|
|
||||||
add(MenuItem(MenuItem::Command, qt_("Clear group"), FuncRequest(LFUN_SET_GRAPHICS_GROUP)));
|
|
||||||
for (; it != end; it++) {
|
for (; it != end; it++) {
|
||||||
addWithStatusCheck(MenuItem(MenuItem::Command, toqstr(*it),
|
addWithStatusCheck(MenuItem(MenuItem::Command, toqstr(*it),
|
||||||
FuncRequest(LFUN_SET_GRAPHICS_GROUP, *it)));
|
FuncRequest(LFUN_SET_GRAPHICS_GROUP, *it)));
|
||||||
|
Loading…
Reference in New Issue
Block a user