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:
sspitzer%netscape.com 2000-11-17 23:20:26 +00:00
Родитель 00e236caf0
Коммит 4177a24add
2 изменённых файлов: 9 добавлений и 3 удалений

Просмотреть файл

@ -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");