タブを閉じた時、親タブの持つ子タブリストからそのタブが削除されない問題を修正

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@1377 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2007-10-28 18:48:02 +00:00
parent 6e9aa8f677
commit 1a20619973
2 changed files with 14 additions and 16 deletions

View File

@ -1196,23 +1196,21 @@ catch(e) {
this.setTabValue(tab, this.kCHILDREN, backupChildren);
}
if (!nextFocusedTab) {
if (parentTab) {
var firstSibling = this.getFirstChildTab(parentTab);
var lastSibling = this.getLastChildTab(parentTab);
if (tab == lastSibling) {
if (tab == firstSibling) { // there is only one child
nextFocusedTab = parentTab;
}
else { // previous sibling tab
nextFocusedTab = this.getPreviousSiblingTab(tab);
}
if (parentTab) {
var firstSibling = this.getFirstChildTab(parentTab);
var lastSibling = this.getLastChildTab(parentTab);
if (tab == lastSibling) {
if (tab == firstSibling) { // there is only one child
nextFocusedTab = parentTab;
}
else { // previous sibling tab
nextFocusedTab = this.getPreviousSiblingTab(tab);
}
this.partTab(tab, true);
}
else {
nextFocusedTab = this.getNextSiblingTab(tab);
}
this.partTab(tab, true);
}
if (!nextFocusedTab) {
nextFocusedTab = this.getNextSiblingTab(tab);
}
if (nextFocusedTab && b.selectedTab == tab)

View File

@ -5,7 +5,7 @@
<RDF:Description RDF:about="urn:mozilla:install-manifest"
em:id="treestyletab@piro.sakura.ne.jp"
em:name="Tree Style Tab"
em:version="0.3.2007102903"
em:version="0.3.2007102904"
em:creator="SHIMODA Hiroshi"
em:description="Show tabs like a tree."
em:homepageURL="http://piro.sakura.ne.jp/xul/treestyletab/"