diff options
| -rw-r--r-- | indra/llvfs/lldir.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/app_settings/settings.xml | 17 | ||||
| -rw-r--r-- | indra/newview/llappviewer.cpp | 16 | ||||
| -rw-r--r-- | indra/newview/llselectmgr.cpp | 23 | ||||
| -rw-r--r-- | indra/newview/llviewermediafocus.cpp | 7 | ||||
| -rw-r--r-- | indra/newview/llviewermediafocus.h | 2 | ||||
| -rw-r--r-- | indra/newview/llviewerwindow.cpp | 39 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/panel_preferences_advanced.xml | 2 | 
8 files changed, 66 insertions, 42 deletions
| diff --git a/indra/llvfs/lldir.cpp b/indra/llvfs/lldir.cpp index 781321e5e4..c0c6e592d5 100644 --- a/indra/llvfs/lldir.cpp +++ b/indra/llvfs/lldir.cpp @@ -580,7 +580,7 @@ void LLDir::setLindenUserDir(const std::string &first, const std::string &last)  	}  	else  	{ -		llerrs << "Invalid name for LLDir::setLindenUserDir" << llendl; +		llerrs << "Invalid name for LLDir::setLindenUserDir(first='" << first << "', last='" << last << "')" << llendl;  	}  	dumpCurrentDirectories();	 diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 7254fff664..e8af26c743 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -133,7 +133,7 @@        <key>Value</key>        <integer>1</integer>      </map> -    <key>ArrowKeysMoveAvatar</key> +    <key>ArrowKeysAlwaysMove</key>      <map>        <key>Comment</key>        <string>While cursor is in chat entry box, arrow keys still control your avatar</string> @@ -142,7 +142,7 @@        <key>Type</key>        <string>Boolean</string>        <key>Value</key> -      <integer>1</integer> +      <integer>0</integer>      </map>      <key>AskedAboutCrashReports</key>      <map> @@ -5473,7 +5473,18 @@      <key>QAModeEventHostPort</key>      <map>        <key>Comment</key> -      <string>Enable Testing Features.</string> +      <string>Port on which lleventhost should listen</string> +      <key>Persist</key> +      <integer>0</integer> +      <key>Type</key> +      <string>S32</string> +      <key>Value</key> +      <integer>-1</integer> +    </map> +    <key>QAModeTermCode</key> +    <map> +      <key>Comment</key> +      <string>On LL_ERRS, terminate with this code instead of OS message box</string>        <key>Persist</key>        <integer>0</integer>        <key>Type</key> diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 873215169e..e95eec4741 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -620,7 +620,19 @@ bool LLAppViewer::init()  	if (!initConfiguration())  		return false; -	 + +	// Although initLogging() is the right place to mess with +	// setFatalFunction(), we can't query gSavedSettings until after +	// initConfiguration(). +	S32 rc(gSavedSettings.getS32("QAModeTermCode")); +	if (rc >= 0) +	{ +		// QAModeTermCode set, terminate with that rc on LL_ERRS. Use _exit() +		// rather than exit() because normal cleanup depends too much on +		// successful startup! +		LLError::setFatalFunction(boost::bind(_exit, rc)); +	} +      mAlloc.setProfilingEnabled(gSavedSettings.getBOOL("MemProfiling"));      // *NOTE:Mani - LLCurl::initClass is not thread safe.  @@ -1665,7 +1677,7 @@ bool LLAppViewer::initLogging()  	LLError::initForApplication(  				gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, ""));  	LLError::setFatalFunction(errorCallback); -	 +  	// Remove the last ".old" log file.  	std::string old_log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,  							     "SecondLife.old"); diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 26e668adb5..dd07a3c015 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -3406,7 +3406,7 @@ void LLSelectMgr::deselectAll()  	{  		return;  	} - +		  	// Zap the angular velocity, as the sim will set it to zero  	for (LLObjectSelection::iterator iter = mSelectedObjects->begin();  		 iter != mSelectedObjects->end(); iter++ ) @@ -3496,6 +3496,7 @@ void LLSelectMgr::deselectAllIfTooFar()  	LLVector3d selectionCenter = getSelectionCenterGlobal();  	if (gSavedSettings.getBOOL("LimitSelectDistance")  		&& (!mSelectedObjects->getPrimaryObject() || !mSelectedObjects->getPrimaryObject()->isAvatar()) +		&& (mSelectedObjects->getPrimaryObject() != LLViewerMediaFocus::getInstance()->getFocusedObject())  		&& !mSelectedObjects->isAttachment()  		&& !selectionCenter.isExactlyZero())  	{ @@ -4912,6 +4913,7 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud)  		{  			inspect_item_id = inspect_instance->getSelectedUUID();  		} +		LLUUID focus_item_id = LLViewerMediaFocus::getInstance()->getFocusedObjectID();  		for (S32 pass = 0; pass < 2; pass++)  		{  			for (LLObjectSelection::iterator iter = mSelectedObjects->begin(); @@ -4925,7 +4927,11 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud)  				{  					continue;  				} -				if(objectp->getID() == inspect_item_id) +				if (objectp->getID() == focus_item_id) +				{ +					node->renderOneSilhouette(gFocusMgr.getFocusColor()); +				} +				else if(objectp->getID() == inspect_item_id)  				{  					node->renderOneSilhouette(sHighlightInspectColor);  				} @@ -4979,19 +4985,6 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud)  		}  	} -#if 0	 -	// Hilight focused media object -	{ -		LLViewerObject* objectp = LLViewerMediaFocus::getInstance()->getFocusedObject(); -		if(objectp) -		{ -			// FIXME: how do I construct a silhouette for an object that's not selected? -			// Would we need to add another LLObjectSelectionHandle for this purpose? -			node->renderOneSilhouette(gFocusMgr.getFocusColor()); -		} -	} -#endif -  	if (for_hud && avatar)  	{  		glMatrixMode(GL_PROJECTION); diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp index 657c58364f..b2a0fa4b1c 100644 --- a/indra/newview/llviewermediafocus.cpp +++ b/indra/newview/llviewermediafocus.cpp @@ -77,6 +77,10 @@ void LLViewerMediaFocus::setFocusFace(LLPointer<LLViewerObject> objectp, S32 fac  	{  		old_media_impl->focus(false);  	} +	 +	// Always clear the current selection.  If we're setting focus on a face, we'll reselect the correct object below. +	LLSelectMgr::getInstance()->deselectAll(); +	mSelection = NULL;  	if (media_impl.notNull() && objectp.notNull())  	{ @@ -87,6 +91,9 @@ void LLViewerMediaFocus::setFocusFace(LLPointer<LLViewerObject> objectp, S32 fac  		mFocusedObjectFace = face;  		mFocusedObjectNormal = pick_normal; +		// Set the selection in the selection manager so we can draw the focus ring. +		mSelection = LLSelectMgr::getInstance()->selectObjectOnly(objectp, face); +  		// Focusing on a media face clears its disable flag.  		media_impl->setDisabled(false); diff --git a/indra/newview/llviewermediafocus.h b/indra/newview/llviewermediafocus.h index e5f36d341c..89ee0ae283 100644 --- a/indra/newview/llviewermediafocus.h +++ b/indra/newview/llviewermediafocus.h @@ -76,6 +76,7 @@ public:  	LLViewerMediaImpl* getFocusedMediaImpl();  	LLViewerObject* getFocusedObject();  	S32 getFocusedFace() { return mFocusedObjectFace; } +	LLUUID getFocusedObjectID() { return mFocusedObjectID; }  	// These look up (by uuid) and return the values that were set with setHoverFace.  They will return null if the objects have been destroyed.  	LLViewerMediaImpl* getHoverMediaImpl(); @@ -95,6 +96,7 @@ protected:  private:  	LLHandle<LLPanelPrimMediaControls> mMediaControls; +	LLObjectSelectionHandle mSelection;  	LLUUID mFocusedObjectID;  	S32 mFocusedObjectFace; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index b574a9c110..9b3dbcd2f6 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2113,31 +2113,30 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)  		// arrow keys move avatar while chatting hack  		if (chat_editor && chat_editor->hasFocus())  		{ -			if (chat_editor->getText().empty() || gSavedSettings.getBOOL("ArrowKeysMoveAvatar")) +			// If text field is empty, there's no point in trying to move +			// cursor with arrow keys, so allow movement +			if (chat_editor->getText().empty()  +				|| gSavedSettings.getBOOL("ArrowKeysAlwaysMove"))  			{ -				switch(key) +				// let Control-Up and Control-Down through for chat line history, +				if (!(key == KEY_UP && mask == MASK_CONTROL) +					&& !(key == KEY_DOWN && mask == MASK_CONTROL))  				{ -				case KEY_LEFT: -				case KEY_RIGHT: -				case KEY_UP: -					// let CTRL UP through for chat line history -					if( MASK_CONTROL == mask ) +					switch(key)  					{ +					case KEY_LEFT: +					case KEY_RIGHT: +					case KEY_UP: +					case KEY_DOWN: +					case KEY_PAGE_UP: +					case KEY_PAGE_DOWN: +					case KEY_HOME: +						// when chatbar is empty or ArrowKeysAlwaysMove set, +						// pass arrow keys on to avatar... +						return FALSE; +					default:  						break;  					} -				case KEY_DOWN: -					// let CTRL DOWN through for chat line history -					if( MASK_CONTROL == mask ) -					{ -						break; -					} -				case KEY_PAGE_UP: -				case KEY_PAGE_DOWN: -				case KEY_HOME: -					// when chatbar is empty or ArrowKeysMoveAvatar set, pass arrow keys on to avatar... -					return FALSE; -				default: -					break;  				}  			}  		} diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml index f98f3a0850..613decad8d 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml @@ -212,7 +212,7 @@ Avatars:       width="256"       top_pad="0"/>      <check_box -     control_name="ArrowKeysMoveAvatar" +     control_name="ArrowKeysAlwaysMove"       follows="left|top"       height="20"       label="Arrow keys always move me" | 
