Commit fcc5d8e1 authored by Urs Fleisch's avatar Urs Fleisch
Browse files

Modeless import source dialog.

parent 428a4a11
......@@ -66,6 +66,7 @@ ImportDialog::ImportDialog(QWidget* parent, QString& caption,
vlayout->setSpacing(6);
vlayout->setMargin(6);
m_impsel = new ImportSelector(this, m_trackDataVector);
connect(this, SIGNAL(finished(int)), m_impsel, SLOT(hideSubdialogs()));
vlayout->addWidget(m_impsel);
QHBoxLayout* hlayout = new QHBoxLayout;
......
......@@ -386,7 +386,7 @@ void ImportSelector::displayImportSourceDialog(ImportSource* source)
m_importSourceDialog->setImportSource(source);
m_importSourceDialog->setArtistAlbum(m_trackDataVector.getArtist(),
m_trackDataVector.getAlbum());
(void)m_importSourceDialog->exec();
m_importSourceDialog->show();
}
}
......@@ -1038,3 +1038,12 @@ void ImportSelector::matchWithTitle()
delete [] md;
}
}
/**
* Hide subdialogs.
*/
void ImportSelector::hideSubdialogs()
{
if (m_importSourceDialog)
m_importSourceDialog->hide();
}
......@@ -268,6 +268,11 @@ public slots:
*/
void matchWithTitle();
/**
* Hide subdialogs.
*/
void hideSubdialogs();
private:
enum ImportSourceType {
None, File, Clipboard
......
......@@ -52,7 +52,6 @@ ImportSourceDialog::ImportSourceDialog(QWidget* parent) : QDialog(parent),
m_coverArtCheckBox(0), m_source(0)
{
setObjectName("ImportSourceDialog");
setModal(true);
QVBoxLayout* vlayout = new QVBoxLayout(this);
vlayout->setSpacing(6);
......
Markdown is supported
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