зеркало из https://github.com/mozilla/gecko-dev.git
fix for #60523. make sure that the current profile is visible on startup
and any newly created profile is visible after creation. sr=alecf
This commit is contained in:
Родитель
00e236caf0
Коммит
4177a24add
|
@ -42,8 +42,10 @@ function CreateProfile( aProfName, aProfDir )
|
|||
var profile = new Profile( aProfName, aProfDir, "yes" );
|
||||
var item = AddItem( "profilekids", profile );
|
||||
var profileTree = document.getElementById( "profiles" );
|
||||
if( item )
|
||||
if( item ) {
|
||||
profileTree.selectItem( item );
|
||||
profileTree.ensureElementIsVisible( item );
|
||||
}
|
||||
}
|
||||
|
||||
// rename the selected profile
|
||||
|
@ -154,8 +156,10 @@ function DeleteProfile( deleteFiles )
|
|||
}
|
||||
catch (ex) {
|
||||
}
|
||||
if( firstAdjacent )
|
||||
if( firstAdjacent ) {
|
||||
profileTree.selectItem( firstAdjacent );
|
||||
profileTree.ensureElementIsVisible( firstAdjacent );
|
||||
}
|
||||
// set the button state
|
||||
DoEnabling();
|
||||
}
|
||||
|
|
|
@ -85,8 +85,10 @@ function highlightCurrentProfile()
|
|||
return;
|
||||
var currentProfileItem = document.getElementById( ( "profileName_" + currentProfile ) );
|
||||
var profileList = document.getElementById( "profiles" );
|
||||
if( currentProfileItem )
|
||||
if( currentProfileItem ) {
|
||||
profileList.selectItem( currentProfileItem );
|
||||
profileList.ensureElementIsVisible( currentProfileItem );
|
||||
}
|
||||
}
|
||||
catch(e) {
|
||||
dump("*** failed to select current profile in list\n");
|
||||
|
|
Загрузка…
Ссылка в новой задаче