タブを追加した時の自動開閉の判断基準を変更
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@1288 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
51d42afcfe
commit
bb1e18768b
@ -1746,13 +1746,15 @@ catch(e) {
|
||||
|
||||
if (!aInfo.dontExpand) {
|
||||
if (
|
||||
/*
|
||||
(
|
||||
aParent.getAttribute(this.kSUBTREE_COLLAPSED) == 'true' ||
|
||||
children.indexOf('|') < 0 // first child
|
||||
children.indexOf('|') > -1 // not a first child
|
||||
) &&
|
||||
*/
|
||||
this.getPref('extensions.treestyletab.autoCollapseExpandSubTreeOnSelect')
|
||||
) {
|
||||
this.collapseExpandTreesIntelligentlyFor(aChild);
|
||||
this.collapseExpandTreesIntelligentlyFor(aParent);
|
||||
var p = aParent;
|
||||
do {
|
||||
this.collapseExpandTabSubTree(p, false);
|
||||
@ -2010,7 +2012,7 @@ catch(e) {
|
||||
var b = this.getTabBrowserFromChildren(aTab);
|
||||
if (b.__treestyletab__doingCollapseExpand) return;
|
||||
|
||||
var parent = this.getParentTab(aTab);
|
||||
var sameParentTab = this.getParentTab(aTab);
|
||||
var expandedParentTabs = [
|
||||
aTab.getAttribute(this.kID)
|
||||
];
|
||||
@ -2035,12 +2037,15 @@ catch(e) {
|
||||
parentTab = this.getParentTab(collapseTab);
|
||||
if (parentTab) {
|
||||
dontCollapse = true;
|
||||
do {
|
||||
if (parentTab != parent) continue;
|
||||
dontCollapse = false;
|
||||
break;
|
||||
if (parentTab.getAttribute(this.kSUBTREE_COLLAPSED) != 'true') {
|
||||
do {
|
||||
if (expandedParentTabs.indexOf(parentTab.getAttribute(this.kID)) < 0)
|
||||
continue;
|
||||
dontCollapse = false;
|
||||
break;
|
||||
}
|
||||
while (parentTab = this.getParentTab(parentTab));
|
||||
}
|
||||
while (parentTab = this.getParentTab(parentTab));
|
||||
}
|
||||
|
||||
if (!dontCollapse)
|
||||
|
Loading…
Reference in New Issue
Block a user