merge.
commit
df9e11b232
|
|
@ -131,14 +131,7 @@ void LLMorphView::setVisible(BOOL visible)
|
|||
|
||||
if (visible)
|
||||
{
|
||||
llassert( !gFloaterCustomize );
|
||||
gFloaterCustomize = new LLFloaterCustomize();
|
||||
gFloaterCustomize->fetchInventory();
|
||||
gFloaterCustomize->openFloater();
|
||||
|
||||
// Must do this _after_ gFloaterView is initialized.
|
||||
gFloaterCustomize->switchToDefaultSubpart();
|
||||
|
||||
// TODO: verify some user action has already opened outfit editor? - Nyx
|
||||
initialize();
|
||||
|
||||
// First run dialog
|
||||
|
|
@ -146,13 +139,7 @@ void LLMorphView::setVisible(BOOL visible)
|
|||
}
|
||||
else
|
||||
{
|
||||
if( gFloaterCustomize )
|
||||
{
|
||||
gFloaterView->removeChild( gFloaterCustomize );
|
||||
delete gFloaterCustomize;
|
||||
gFloaterCustomize = NULL;
|
||||
}
|
||||
|
||||
// TODO: verify some user action has already closed outfit editor ? - Nyx
|
||||
shutdown();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@
|
|||
#include "llsidetray.h"
|
||||
#include "lltextbox.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "llvoavatarself.h"
|
||||
#include "llwearable.h"
|
||||
|
|
@ -267,14 +268,14 @@ void LLSidepanelAppearance::showOutfitsInventoryPanel()
|
|||
void LLSidepanelAppearance::showOutfitEditPanel()
|
||||
{
|
||||
togglMyOutfitsPanel(FALSE);
|
||||
toggleWearableEditPanel(FALSE);
|
||||
toggleWearableEditPanel(FALSE, NULL, TRUE); // don't switch out of edit appearance mode
|
||||
toggleOutfitEditPanel(TRUE);
|
||||
}
|
||||
|
||||
void LLSidepanelAppearance::showWearableEditPanel(LLWearable *wearable /* = NULL*/)
|
||||
{
|
||||
togglMyOutfitsPanel(FALSE);
|
||||
toggleOutfitEditPanel(FALSE);
|
||||
toggleOutfitEditPanel(FALSE, TRUE); // don't switch out of edit appearance mode
|
||||
toggleWearableEditPanel(TRUE, wearable);
|
||||
}
|
||||
|
||||
|
|
@ -300,7 +301,7 @@ void LLSidepanelAppearance::togglMyOutfitsPanel(BOOL visible)
|
|||
}
|
||||
}
|
||||
|
||||
void LLSidepanelAppearance::toggleOutfitEditPanel(BOOL visible)
|
||||
void LLSidepanelAppearance::toggleOutfitEditPanel(BOOL visible, BOOL disable_camera_switch)
|
||||
{
|
||||
if (!mOutfitEdit || mOutfitEdit->getVisible() == visible)
|
||||
{
|
||||
|
|
@ -313,10 +314,18 @@ void LLSidepanelAppearance::toggleOutfitEditPanel(BOOL visible)
|
|||
if (visible)
|
||||
{
|
||||
mOutfitEdit->onOpen(LLSD());
|
||||
if (!disable_camera_switch && gSavedSettings.getBOOL("AppearanceCameraMovement") )
|
||||
{
|
||||
gAgentCamera.changeCameraToCustomizeAvatar();
|
||||
}
|
||||
}
|
||||
else if (!disable_camera_switch && gSavedSettings.getBOOL("AppearanceCameraMovement") )
|
||||
{
|
||||
gAgentCamera.changeCameraToDefault();
|
||||
}
|
||||
}
|
||||
|
||||
void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLWearable *wearable)
|
||||
void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLWearable *wearable, BOOL disable_camera_switch)
|
||||
{
|
||||
if (!mEditWearable || mEditWearable->getVisible() == visible)
|
||||
{
|
||||
|
|
@ -340,11 +349,19 @@ void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLWearable *we
|
|||
if (visible)
|
||||
{
|
||||
mEditWearable->onOpen(LLSD()); // currently no-op, just for consistency
|
||||
if (!disable_camera_switch && gSavedSettings.getBOOL("AppearanceCameraMovement") )
|
||||
{
|
||||
gAgentCamera.changeCameraToCustomizeAvatar();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Save changes if closing.
|
||||
mEditWearable->saveChanges();
|
||||
if (!disable_camera_switch && gSavedSettings.getBOOL("AppearanceCameraMovement") )
|
||||
{
|
||||
gAgentCamera.changeCameraToDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -75,8 +75,8 @@ private:
|
|||
void onEditAppearanceButtonClicked();
|
||||
|
||||
void togglMyOutfitsPanel(BOOL visible);
|
||||
void toggleOutfitEditPanel(BOOL visible);
|
||||
void toggleWearableEditPanel(BOOL visible, LLWearable* wearable = NULL);
|
||||
void toggleOutfitEditPanel(BOOL visible, BOOL disable_camera_switch = FALSE);
|
||||
void toggleWearableEditPanel(BOOL visible, LLWearable* wearable = NULL, BOOL disable_camera_switch = FALSE);
|
||||
|
||||
LLFilterEditor* mFilterEditor;
|
||||
LLPanelOutfitsInventory* mPanelOutfitsInventory;
|
||||
|
|
|
|||
|
|
@ -5612,6 +5612,11 @@ void handle_customize_avatar()
|
|||
LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "my_outfits"));
|
||||
}
|
||||
|
||||
void handle_edit_outfit()
|
||||
{
|
||||
LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_outfit"));
|
||||
}
|
||||
|
||||
void handle_edit_shape()
|
||||
{
|
||||
LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD().with("type", "edit_shape"));
|
||||
|
|
@ -7727,6 +7732,7 @@ void initialize_menus()
|
|||
view_listener_t::addMenu(new LLEditEnableCustomizeAvatar(), "Edit.EnableCustomizeAvatar");
|
||||
view_listener_t::addMenu(new LLEnableEditShape(), "Edit.EnableEditShape");
|
||||
commit.add("CustomizeAvatar", boost::bind(&handle_customize_avatar));
|
||||
commit.add("EditOutfit", boost::bind(&handle_edit_outfit));
|
||||
commit.add("EditShape", boost::bind(&handle_edit_shape));
|
||||
|
||||
// View menu
|
||||
|
|
|
|||
|
|
@ -191,8 +191,15 @@
|
|||
<menu_item_call.on_enable
|
||||
function="Edit.EnableCustomizeAvatar" />
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Edit My Shape"
|
||||
<menu_item_call label="Edit My Outfit"
|
||||
layout="topleft"
|
||||
name="Edit Outfit">
|
||||
<menu_item_call.on_click
|
||||
function="EditOutfit" />
|
||||
<menu_item_call.on_enable
|
||||
function="Edit.EnableCustomizeAvatar" />
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Edit My Shape"
|
||||
layout="topleft"
|
||||
name="Edit My Shape">
|
||||
<menu_item_call.on_click
|
||||
|
|
|
|||
Loading…
Reference in New Issue