From dd18b16982d6ddb1f73765068d31bcd015091368 Mon Sep 17 00:00:00 2001 From: piro Date: Fri, 23 Nov 2007 21:34:43 +0000 Subject: [PATCH] =?UTF-8?q?=E3=82=BB=E3=83=83=E3=82=B7=E3=83=A7=E3=83=B3?= =?UTF-8?q?=E5=BE=A9=E5=85=83=E6=99=82=E3=81=AB=E3=83=84=E3=83=AA=E3=83=BC?= =?UTF-8?q?=E3=81=8C=E5=A3=8A=E3=82=8C=E3=82=8B=E3=81=93=E3=81=A8=E3=81=8C?= =?UTF-8?q?=E3=81=82=E3=81=A3=E3=81=9F=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@1615 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- content/treestyletab/treestyletabbrowser.js | 23 +++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index 15d7503c..7a721691 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -1106,13 +1106,22 @@ TreeStyleTabBrowser.prototype = { id += 'd'; } - /* If it has a parent, it is wrongly attacched by tab moving - on restoring. Restoring the old ID (the next statement) - breaks the children list of the temporary parent and causes - many problems. So, to prevent these problems, I part the tab - from the temporary parent manually. */ - if (!isDuplicated && this.getParentTab(tab)) + if (!isDuplicated) { + /* If it has a parent, it is wrongly attacched by tab moving + on restoring. Restoring the old ID (the next statement) + breaks the children list of the temporary parent and causes + many problems. So, to prevent these problems, I part the tab + from the temporary parent manually. */ this.partTab(tab); + /* reset attributes before restoring */ + tab.removeAttribute(this.kID); + tab.removeAttribute(this.kPARENT); + tab.removeAttribute(this.kCHILDREN); + tab.removeAttribute(this.kSUBTREE_COLLAPSED); + tab.removeAttribute(this.kCOLLAPSED); + tab.removeAttribute(this.kNEST); + this.updateTabsIndent([tab]); + } this.setTabValue(tab, this.kID, id); @@ -1161,7 +1170,9 @@ TreeStyleTabBrowser.prototype = { if (!parent && (before = this.getTabById(before))) { var index = before._tPos; if (index > tab._tPos) index--; +// b.treeStyleTab.internallyTabMoving = true; b.moveTabTo(tab, index); +// b.treeStyleTab.internallyTabMoving = false; } this.deleteTabValue(tab, this.kINSERT_BEFORE);