Commit adf410eb authored by Dirk Wilden's avatar Dirk Wilden

do not display the dialog when its not needed

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@8375 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 8725dd8a
......@@ -135,6 +135,7 @@ FileOptionsDialog::FileOptionsDialog(std::vector<fileTypes>& _supportedTypes, QS
connect( cancel, SIGNAL(clicked()), this, SLOT(reject()) );
connect( ok, SIGNAL(clicked()), this, SLOT(accept()) );
}
FileOptionsDialog::~FileOptionsDialog()
......@@ -158,6 +159,14 @@ FileOptionsDialog::~FileOptionsDialog()
}
}
int FileOptionsDialog::exec(){
if ( tabs_.count() == 0 && boxes_.count() == 0 )
return QDialog::Accepted;
else
return QDialog::exec();
}
void FileOptionsDialog::slotPluginChanged(QString _name){
QComboBox* box = dynamic_cast<QComboBox*>(QObject::sender());
......
......@@ -56,6 +56,9 @@ class FileOptionsDialog : public QDialog
signals:
void setPluginForExtension(QString _extension, int _pluginId );
public slots:
int exec();
private:
bool loadMode_;
......
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