From 16cca80f7ce476bf942cde113ce494f6489d0ccd Mon Sep 17 00:00:00 2001 From: mcmlxxix <> Date: Fri, 1 Mar 2013 19:47:05 +0000 Subject: [PATCH] allow LayoutView as layout.delView parameter (and ViewTab for view.delTab) --- exec/load/layout.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/exec/load/layout.js b/exec/load/layout.js index b7eb4884ae..ce2bc77ac0 100644 --- a/exec/load/layout.js +++ b/exec/load/layout.js @@ -196,6 +196,8 @@ function Layout(frame) { } this.delView=function(title_or_index) { var view = false; + if(title_or_index instanceof LayoutView) + title_or_index = title_or_index.title; if(isNaN(title_or_index)) { for(var v=0;v<properties.views.length;v++) { if(properties.views[v].title.toUpperCase() == title_or_index.toUpperCase()) { @@ -490,6 +492,8 @@ function LayoutView(title,frame,parent) { } this.delTab=function(title_or_index) { var tab = false; + if(title_or_index instanceof ViewTab) + title_or_index = title_or_index.title; if(isNaN(title_or_index)) { for(var t=0;t<properties.tabs.length;t++) { if(properties.tabs[t].title.toUpperCase() == title_or_index.toUpperCase()) { -- GitLab