summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llviewermenu.cpp25
-rw-r--r--indra/newview/skins/default/xui/en/menu_edit.xml9
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml9
3 files changed, 11 insertions, 32 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 605d1a04e6..c68f6b8a15 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -4177,27 +4177,6 @@ class LLViewToggleUI : public view_listener_t
}
};
-class LLEditDuplicate : public view_listener_t
-{
- bool handleEvent(const LLSD& userdata)
- {
- if(LLEditMenuHandler::gEditMenuHandler)
- {
- LLEditMenuHandler::gEditMenuHandler->duplicate();
- }
- return true;
- }
-};
-
-class LLEditEnableDuplicate : public view_listener_t
-{
- bool handleEvent(const LLSD& userdata)
- {
- bool new_value = LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canDuplicate();
- return new_value;
- }
-};
-
void handle_duplicate_in_place(void*)
{
LL_INFOS() << "handle_duplicate_in_place" << LL_ENDL;
@@ -8710,7 +8689,6 @@ void initialize_edit_menu()
view_listener_t::addMenu(new LLEditDelete(), "Edit.Delete");
view_listener_t::addMenu(new LLEditSelectAll(), "Edit.SelectAll");
view_listener_t::addMenu(new LLEditDeselect(), "Edit.Deselect");
- view_listener_t::addMenu(new LLEditDuplicate(), "Edit.Duplicate");
view_listener_t::addMenu(new LLEditTakeOff(), "Edit.TakeOff");
view_listener_t::addMenu(new LLEditEnableUndo(), "Edit.EnableUndo");
view_listener_t::addMenu(new LLEditEnableRedo(), "Edit.EnableRedo");
@@ -8720,7 +8698,6 @@ void initialize_edit_menu()
view_listener_t::addMenu(new LLEditEnableDelete(), "Edit.EnableDelete");
view_listener_t::addMenu(new LLEditEnableSelectAll(), "Edit.EnableSelectAll");
view_listener_t::addMenu(new LLEditEnableDeselect(), "Edit.EnableDeselect");
- view_listener_t::addMenu(new LLEditEnableDuplicate(), "Edit.EnableDuplicate");
}
@@ -9131,6 +9108,7 @@ void initialize_menus()
view_listener_t::addMenu(new LLObjectAttachToAvatar(true), "Object.AttachToAvatar");
view_listener_t::addMenu(new LLObjectAttachToAvatar(false), "Object.AttachAddToAvatar");
view_listener_t::addMenu(new LLObjectReturn(), "Object.Return");
+ commit.add("Object.Duplicate", boost::bind(&LLSelectMgr::duplicate, LLSelectMgr::getInstance()));
view_listener_t::addMenu(new LLObjectReportAbuse(), "Object.ReportAbuse");
view_listener_t::addMenu(new LLObjectMute(), "Object.Mute");
@@ -9152,6 +9130,7 @@ void initialize_menus()
enable.add("Object.EnableSit", boost::bind(&enable_object_sit, _1));
view_listener_t::addMenu(new LLObjectEnableReturn(), "Object.EnableReturn");
+ enable.add("Object.EnableDuplicate", boost::bind(&LLSelectMgr::canDuplicate, LLSelectMgr::getInstance()));
view_listener_t::addMenu(new LLObjectEnableReportAbuse(), "Object.EnableReportAbuse");
enable.add("Avatar.EnableMute", boost::bind(&enable_object_mute));
diff --git a/indra/newview/skins/default/xui/en/menu_edit.xml b/indra/newview/skins/default/xui/en/menu_edit.xml
index 99061e089a..6f83756f83 100644
--- a/indra/newview/skins/default/xui/en/menu_edit.xml
+++ b/indra/newview/skins/default/xui/en/menu_edit.xml
@@ -62,15 +62,6 @@
<menu_item_call.on_enable
function="Edit.EnableDelete" />
</menu_item_call>
- <menu_item_call
- label="Duplicate"
- name="Duplicate"
- shortcut="control|D">
- <menu_item_call.on_click
- function="Edit.Duplicate" />
- <menu_item_call.on_enable
- function="Edit.EnableDuplicate" />
- </menu_item_call>
<menu_item_separator/>
<menu_item_call
label="Select All"
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index c96b7ae673..12df3749f6 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -1025,6 +1025,15 @@
<menu_item_call.on_enable
function="Object.EnableReturn" />
</menu_item_call>
+ <menu_item_call
+ label="Duplicate"
+ name="DuplicateObject"
+ shortcut="control|D">
+ <menu_item_call.on_click
+ function="Object.Duplicate" />
+ <menu_item_call.on_enable
+ function="Object.EnableDuplicate" />
+ </menu_item_call>
</menu>
<menu
create_jump_keys="true"