Commit 9196a67b authored by saubatn's avatar saubatn
Browse files

FIXED Display a message box when no images are found for opening in the input directory.

FIXED Clear list when opening a second time a directory (previsously the list was already filled with the last opened images).

git-svn-id: svn+ssh://scm.forge.imag.fr/var/lib/gforge/chroot/scmrepos/svn/camitk/trunk/camitk@1789 ec899d31-69d1-42ba-9299-647d76f65fb3
parent 152b31e2
......@@ -92,6 +92,8 @@ Component * DicomComponentExtension::open(const QString & path) throw (AbortExce
}
}
serieDialogEntries.clear();
return lastOpenedComponent;
}
......
......@@ -27,7 +27,8 @@
#include "DicomDialog.h"
#include "DicomDialogEntry.h"
#include <iostream>
// Qt include
#include <QMessageBox>
//--------------- Constructor ---------------------------------
......@@ -36,8 +37,13 @@ DicomDialog::DicomDialog(QList<DicomDialogEntry*> elements): QDialog() {
dicomDialogEntries = elements;
ui.setupUi(this);
if(elements.isEmpty()){
QMessageBox::critical(this, tr("Error"), tr("No DICOM image files found"));
return;
}
// set table size
// ui.tableWidget->setColumnCount();
ui.tableWidget->clear();
ui.tableWidget->setRowCount(elements.size());
int row = 0;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment