diff --git a/src/maven/librarydialog.cpp b/src/maven/librarydialog.cpp index 97d17775..0d6a5635 100644 --- a/src/maven/librarydialog.cpp +++ b/src/maven/librarydialog.cpp @@ -81,7 +81,9 @@ void LibraryMangerDialog::loadCompoundsFile() { "All Known Formats(*.csv *.tab *.txt *.msp *.sptxt *.pepXML);;Tab Delimited(*.tab);;CSV File(*.csv);;NIST Library(*.msp);;SpectraST(*.sptxt) pepXML(*.pepXML)"); if ( filelist.size() == 0 || filelist[0].isEmpty() ) return; - loadCompoundsFile(filelist[0]); + for( QString filename: filelist) { + loadCompoundsFile(filename); + } } void LibraryMangerDialog::reloadMethodsFolder() { diff --git a/src/maven/tabledockwidget.cpp b/src/maven/tabledockwidget.cpp index e2a00c5d..1cd48576 100644 --- a/src/maven/tabledockwidget.cpp +++ b/src/maven/tabledockwidget.cpp @@ -131,7 +131,7 @@ TableDockWidget::TableDockWidget(MainWindow* mw, QString title, int numColms) { QToolButton *btnX = new QToolButton(toolBar); btnX->setIcon(style()->standardIcon(QStyle::SP_DialogCloseButton)); //btnX->setIcon(QIcon(rsrcPath + "/hide.png")); - connect(btnX, SIGNAL(clicked()),SLOT(hide())); + connect(btnX, SIGNAL(clicked()),this,SLOT(deleteAll())); QLineEdit* filterEditor = new QLineEdit(toolBar); filterEditor->setMinimumWidth(15); @@ -435,6 +435,12 @@ QList TableDockWidget::getGroups() { } void TableDockWidget::deleteAll() { + + if (QMessageBox::No == QMessageBox::question(this, "Delete Confirmation", + "Do you want to delete all peakgroups from this table?", QMessageBox::Yes | QMessageBox::No)) { + return; + } + treeWidget->clear(); allgroups.clear(); this->hide();