From deeec1ffe13e91b5ef4442080c970a6540c86d8d Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 2 Aug 2016 11:47:03 -0400 Subject: Add a quick existance check to the userbutton plugin when adding favorites to the menu. --- src-qt5/core/lumina-desktop/panel-plugins/userbutton/UserWidget.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src-qt5/core/lumina-desktop') diff --git a/src-qt5/core/lumina-desktop/panel-plugins/userbutton/UserWidget.cpp b/src-qt5/core/lumina-desktop/panel-plugins/userbutton/UserWidget.cpp index 32193643..c7d8109c 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/userbutton/UserWidget.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/userbutton/UserWidget.cpp @@ -169,7 +169,7 @@ void UserWidget::UpdateMenu(bool forceall){ ui->tool_fav_dirs->setChecked(false); ui->tool_fav_files->setChecked(false); cfav = 0; //favorite apps - updateFavItems(); + FavChanged(); QString cdir = ui->label_home_dir->whatsThis(); if(cdir.isEmpty() || !QFile::exists(cdir)){ //Directory deleted or nothing loaded yet @@ -265,8 +265,9 @@ void UserWidget::updateFavItems(bool newfilter){ favitems.sort(); //sort them alphabetically //qDebug() << " - Creating Items:" << favitems; for(int i=0; iscroll_fav->widget(), favitems[i].section("::::",2,50), favitems[i].section("::::",1,1) ); - if(!it->gooditem){ continue; } + if(!it->gooditem){ it->deleteLater(); continue; } ui->scroll_fav->widget()->layout()->addWidget(it); connect(it, SIGNAL(RunItem(QString)), this, SLOT(LaunchItem(QString)) ); connect(it, SIGNAL(NewShortcut()), this, SLOT(updateFavItems()) ); -- cgit