summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
authorRaphael Rosch <launchpad@insaner.com>2016-04-14 18:19:03 +0000
committerinsaner <launchpad@insaner.com>2016-04-14 18:19:03 +0000
commit1dfba12bc394644560de7d2560aa03061237d0b8 (patch)
tree7956c04251bf5943ef3b7e8c8a077674fb20001e /src/ui
parentFix c++11 flag when required on non-debian-based systems (diff)
downloadinkscape-1dfba12bc394644560de7d2560aa03061237d0b8.tar.gz
inkscape-1dfba12bc394644560de7d2560aa03061237d0b8.zip
function to release object from group
Fixed bugs: - https://launchpad.net/bugs/484041 (bzr r14845)
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/interface.cpp12
-rw-r--r--src/ui/interface.h1
2 files changed, 13 insertions, 0 deletions
diff --git a/src/ui/interface.cpp b/src/ui/interface.cpp
index a16bbc472..3e2a2004c 100644
--- a/src/ui/interface.cpp
+++ b/src/ui/interface.cpp
@@ -1523,6 +1523,12 @@ ContextMenu::ContextMenu(SPDesktop *desktop, SPItem *item) :
MIParent.signal_activate().connect(sigc::mem_fun(*this, &ContextMenu::LeaveGroup));
MIParent.show();
append(MIParent);
+
+ /* Pop selection out of group */
+ Gtk::MenuItem* miu = Gtk::manage(new Gtk::MenuItem(_("_Pop selection out of group"), 1));
+ miu->signal_activate().connect(sigc::mem_fun(*this, &ContextMenu::ActivateUngroupPopSelection));
+ miu->show();
+ append(*miu);
}
}
}
@@ -1920,6 +1926,12 @@ void ContextMenu::ActivateUngroup(void)
sp_item_group_ungroup(static_cast<SPGroup*>(_item), children);
_desktop->selection->setList(children);
}
+
+void ContextMenu::ActivateUngroupPopSelection(void)
+{
+ sp_selection_ungroup_pop_selection(_desktop->selection, _desktop);
+}
+
void ContextMenu::MakeAnchorMenu(void)
{
diff --git a/src/ui/interface.h b/src/ui/interface.h
index 6fb74046f..52074f0f0 100644
--- a/src/ui/interface.h
+++ b/src/ui/interface.h
@@ -194,6 +194,7 @@ class ContextMenu : public Gtk::Menu
/**
* callback, is executed on clicking the anchor "Group" and "Ungroup" menu entry
*/
+ void ActivateUngroupPopSelection(void);
void ActivateUngroup(void);
void ActivateGroup(void);