add region exporter to menu, fix a crash in region exporter

This commit is contained in:
Hazim Gazov
2010-06-09 02:12:12 -03:00
parent e9f32dcfbe
commit 29ee9f7a08
4 changed files with 314 additions and 302 deletions

View File

@@ -19,8 +19,7 @@
LLFloaterExportRegion* LLFloaterExportRegion::sInstance = NULL;
LLFloaterExportRegion::LLFloaterExportRegion()
: LLFloater()
LLFloaterExportRegion::LLFloaterExportRegion(const LLSD& unused)
{
sInstance = this;
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_export.xml");
@@ -54,11 +53,14 @@ void LLFloaterExportRegion::onClickSelectAll(void* user_data)
std::vector<LLScrollListItem*> items = list->getAllData();
std::vector<LLScrollListItem*>::iterator item_iter = items.begin();
std::vector<LLScrollListItem*>::iterator items_end = items.end();
bool new_value = !((*item_iter)->getColumn(LIST_CHECKED)->getValue());
for( ; item_iter != items_end; ++item_iter)
if(items.size())
{
LLScrollListItem* item = (*item_iter);
item->getColumn(LIST_CHECKED)->setValue(new_value);
bool new_value = !((*item_iter)->getColumn(LIST_CHECKED)->getValue());
for( ; item_iter != items_end; ++item_iter)
{
LLScrollListItem* item = (*item_iter);
item->getColumn(LIST_CHECKED)->setValue(new_value);
}
}
}

View File

@@ -7,10 +7,11 @@
#include "llvoavatar.h"
class LLFloaterExportRegion
: public LLFloater
: public LLFloater, public LLFloaterSingleton<LLFloaterExportRegion>
{
friend class LLUISingleton<LLFloaterExportRegion, VisibilityPolicy<LLFloater> >;
public:
LLFloaterExportRegion();
LLFloaterExportRegion(const LLSD& unused);
BOOL postBuild(void);
void updateNamesProgress();
void receivePrimName(LLViewerObject* object, std::string name);

View File

@@ -233,6 +233,7 @@
#include "hgfloatertexteditor.h"
#include "llfloatermessagelog.h"
#include "llfloatermessagebuilder.h"
#include "llfloaterexportregion.h"
// </edit>
using namespace LLVOAvatarDefines;
@@ -5631,6 +5632,10 @@ class LLShowFloater : public view_listener_t
{
JCFloaterAreaSearch::toggle();
}
else if (floater_name == "export region")
{
LLFloaterExportRegion::toggleInstance(LLSD());
}
else if (floater_name == "grid options")
{
LLFloaterBuildOptions::show(NULL);

View File

@@ -539,6 +539,10 @@
mouse_opaque="true" name="Region/Estate..." width="185">
<on_click function="ShowFloater" userdata="about region" />
</menu_item_call>
<menu_item_call bottom="-308" enabled="true" height="19" label="Export Region" left="0"
mouse_opaque="true" name="Export Region" width="185">
<on_click function="ShowFloater" userdata="export region" />
</menu_item_call>
<menu_item_separator bottom="-316" enabled="true" height="8" label="-----------" left="0"
mouse_opaque="true" name="separator6" width="185" />
<menu bottom="-554" create_jump_keys="true" drop_shadow="true" enabled="true"