automatically create a pretend inventory item by default

This commit is contained in:
Hazim Gazov
2010-06-20 06:49:24 +00:00
parent eb427a2f89
commit 898e34bccf
2 changed files with 8 additions and 2 deletions

View File

@@ -3,6 +3,7 @@
#include "llfloatervfs.h"
#include "lluictrlfactory.h"
#include "llscrolllistctrl.h"
#include "llcheckboxctrl.h"
#include "llfilepicker.h"
#include "lllocalinventory.h"
#include "llviewerwindow.h"
@@ -270,6 +271,10 @@ void LLFloaterVFS::onClickAdd(void* user_data)
file.mType = asset_type;
file.mName = gDirUtilp->getBaseFileName(file_name, true);
floaterp->add(file);
if(floaterp->getChild<LLCheckBoxCtrl>("create_pretend_item")->get())
{
LLLocalInventory::addItem(file.mName, (int)file.mType, file.mID, true);
}
}
}
// static