void LLPanelSnapshotLocal::onSaveFlyoutCommit(LLUICtrl* ctrl)
{
	if (ctrl->getValue().asString() == "save as")
	{
		gViewerWindow->resetSnapshotLoc();
	}

	LLFloaterSnapshot* floater = LLFloaterSnapshot::getInstance();

	floater->notify(LLSD().with("set-working", true));
	BOOL saved = LLFloaterSnapshot::saveLocal();
	if (saved)
	{
		LLFloaterSnapshot::postSave();
		// <FS:Ansariel> Don't return to target selection after taking a snapshot
		//goBack();
		floater->notify(LLSD().with("set-finished", LLSD().with("ok", true).with("msg", "local")));
	}
	else
	{
		// <FS:Ansariel> Notify user if we could not save file
		LLNotificationsUtil::add("CannotSaveSnapshot");
		floater->notify(LLSD().with("set-ready", true));
		// <FS:Ansariel> Don't return to target selection after taking a snapshot
		//cancel();
	}
}
示例#2
0
void LLPanelSnapshotLocal::onSaveFlyoutCommit(LLUICtrl* ctrl)
{
	if (ctrl->getValue().asString() == "save as")
	{
		gViewerWindow->resetSnapshotLoc();
	}

	LLFloaterSnapshot* floater = LLFloaterSnapshot::getInstance();

	floater->notify(LLSD().with("set-working", true));
	BOOL saved = LLFloaterSnapshot::saveLocal();
	if (saved)
	{
		LLFloaterSnapshot::postSave();
		goBack();
		floater->notify(LLSD().with("set-finished", LLSD().with("ok", true).with("msg", "local")));
	}
	else
	{
		cancel();
	}
}