Improve rect control name of inventory folder floater
This makes it more reliably usable and more understandable to the user. The downside of this is that folders with the same name will have the same position, but I don't think that really matters.
This commit is contained in:
@@ -44,10 +44,7 @@ LFFloaterInvPanel::LFFloaterInvPanel(const LLSD& cat, const std::string& name, L
|
||||
setTitle(title);
|
||||
|
||||
// Figure out a unique name for our rect control
|
||||
const auto rect_control = llformat("FloaterInv%sRect",
|
||||
cat.has("name") ? boost::algorithm::erase_all_copy(cat["name"].asStringRef(), " ").data() :
|
||||
cat.has("id") ? cat["id"].asStringRef().data() :
|
||||
cat["type"].asStringRef().data());
|
||||
const auto rect_control = llformat("FloaterInv%sRect", boost::algorithm::erase_all_copy(title, " ").data());
|
||||
|
||||
if (gSavedSettings.controlExists(rect_control)) // Set our initial rect to the stored control
|
||||
setRect(gSavedSettings.getRect(rect_control));
|
||||
|
||||
Reference in New Issue
Block a user