From 31a119ea305df365406f5130fcf068fd36a59506 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 26 Oct 2015 16:17:36 -0400 Subject: Disable the option to close the "Browser" tab when using column-view. --- lumina-fm/MainUI.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lumina-fm/MainUI.cpp') diff --git a/lumina-fm/MainUI.cpp b/lumina-fm/MainUI.cpp index 832fb97e..e65a3f74 100644 --- a/lumina-fm/MainUI.cpp +++ b/lumina-fm/MainUI.cpp @@ -573,8 +573,9 @@ void MainUI::tabClosed(int tab){ if(tabBar->count()==1){ return; } //Can't close the only tab if(tab < 0){ tab = tabBar->currentIndex(); } QString info = tabBar->tabWhatsThis(tab); + if(info=="browser"){ return; } + //qDebug() << "Tab Closed:" << info; if(!info.startsWith("#")){ - if(DWLIST.length()<2){ return; } for(int i=0; iid()){ DWLIST[i]->cleanup(); @@ -589,6 +590,7 @@ void MainUI::tabClosed(int tab){ qDebug() << "Closing tab:" << tab << tabBar->tabText(tab); tabBar->removeTab(tab); tabBar->setVisible( tabBar->count() > 1 ); + if(DWLIST.isEmpty()){ OpenDirs(QStringList() << QDir::homePath() ); } } void MainUI::prevTab(){ -- cgit