mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-24 21:55:29 +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"
|
||||
Separator
|
||||
Item "Edit externally...|x" "inset-edit"
|
||||
Separator
|
||||
GraphicsGroups
|
||||
End
|
||||
|
||||
|
@ -639,21 +639,15 @@ void MenuDefinition::expandGraphicsGroups(BufferView const * bv)
|
||||
{
|
||||
if (!bv)
|
||||
return;
|
||||
Cursor const & cur = bv->cursor();
|
||||
Buffer const & buf = bv->buffer();
|
||||
set<string> grp;
|
||||
InsetGraphics::getGraphicsGroups(buf, grp);
|
||||
set<string>::const_iterator it = grp.begin();
|
||||
set<string>::const_iterator end = grp.end();
|
||||
InsetGraphics::getGraphicsGroups(bv->buffer(), grp);
|
||||
if (grp.empty())
|
||||
return;
|
||||
|
||||
InsetGraphics * ins = InsetGraphics::getCurrentGraphicsInset(cur);
|
||||
if (!ins)
|
||||
return;
|
||||
add(MenuItem(MenuItem::Separator));
|
||||
if (!ins->getParams().groupId.empty())
|
||||
add(MenuItem(MenuItem::Command, qt_("Clear group"), FuncRequest(LFUN_SET_GRAPHICS_GROUP)));
|
||||
set<string>::const_iterator it = grp.begin();
|
||||
set<string>::const_iterator end = grp.end();
|
||||
add(MenuItem(MenuItem::Command, qt_("No Group"),
|
||||
FuncRequest(LFUN_SET_GRAPHICS_GROUP)));
|
||||
for (; it != end; it++) {
|
||||
addWithStatusCheck(MenuItem(MenuItem::Command, toqstr(*it),
|
||||
FuncRequest(LFUN_SET_GRAPHICS_GROUP, *it)));
|
||||
|
Loading…
Reference in New Issue
Block a user