From c8cc2f4cb871da32f0624a5da1066fd6b6519648 Mon Sep 17 00:00:00 2001 From: Denis Serdjuk Date: Fri, 19 Feb 2010 17:50:13 +0200 Subject: fixed normal Bug EXT-5380 'Place Profile' side panel opens instead 'Search' floater after not-recognized SLURL was entered in Location Field --HG-- branch : product-engine --- indra/newview/llnavigationbar.cpp | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) (limited to 'indra') diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index 46cab0d868..f022bfeb4f 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -505,7 +505,17 @@ void LLNavigationBar::onLocationSelection() local_coords.set(x, y, z); else return; - }else + } + // we have to do this check after previous, because LLUrlRegistry contains handlers for slurl too + //but we need to know whether typed_location is a simple http url. + else if (LLUrlRegistry::instance().isUrl(typed_location)) + { + // display http:// URLs in the media browser, or + // anything else is sent to the search floater + LLWeb::loadURL(typed_location); + return; + } + else { // assume that an user has typed the {region name} or possible {region_name, parcel} region_name = typed_location.substr(0,typed_location.find(',')); @@ -621,20 +631,7 @@ void LLNavigationBar::onRegionNameResponse( // Invalid location? if (!region_handle) { - // handle any secondlife:// SLapps, or - // display http:// URLs in the media browser, or - // anything else is sent to the search floater - if (LLUrlRegistry::instance().isUrl(typed_location)) - { - if (! LLURLDispatcher::dispatchFromTextEditor(typed_location)) - { - LLWeb::loadURL(typed_location); - } - } - else - { - invokeSearch(typed_location); - } + invokeSearch(typed_location); return; } -- cgit v1.2.3