diff options
| author | 2015-04-04 14:41:10 -0400 | |
|---|---|---|
| committer | 2015-04-04 14:41:10 -0400 | |
| commit | b5f93b05578293d1d233b4920a28a5c2fd826f94 (patch) | |
| tree | 82332679f647e9c76e331206786d07a58dcfa9b8 /SQLiteStudio3/guiSQLiteStudio/dialogs/exportdialog.cpp | |
| parent | af8a7a3e3dccf9c9ad257e3952173d180c8a7421 (diff) | |
| parent | a5b034d4a9c44f9bc1e83b01de82530f8fc63013 (diff) | |
Merge tag 'upstream/3.0.4'
Upstream version 3.0.4
# gpg: Signature made Sat 04 Apr 2015 02:41:09 PM EDT using RSA key ID EBE9BD91
# gpg: Good signature from "Unit 193 <unit193@gmail.com>"
# gpg: aka "Unit 193 <unit193@ninthfloor.org>"
# gpg: aka "Unit 193 <unit193@ubuntu.com>"
# gpg: aka "Unit 193 <unit193@ninthfloor.com>"
Diffstat (limited to 'SQLiteStudio3/guiSQLiteStudio/dialogs/exportdialog.cpp')
| -rw-r--r-- | SQLiteStudio3/guiSQLiteStudio/dialogs/exportdialog.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/exportdialog.cpp b/SQLiteStudio3/guiSQLiteStudio/dialogs/exportdialog.cpp index e495dd9..91b4087 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/exportdialog.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/exportdialog.cpp @@ -124,6 +124,14 @@ void ExportDialog::setDatabaseMode(Db* db) this->db = db; } +void ExportDialog::setPreselectedDb(Db *db) +{ + if (!db->isOpen()) + return; + + this->db = db; +} + void ExportDialog::initModePage() { connect(ui->subjectDatabaseRadio, SIGNAL(clicked()), this, SLOT(updateExportMode())); @@ -146,10 +154,11 @@ void ExportDialog::initTablePage() dbListModel = new DbListModel(this); dbListModel->setCombo(ui->exportTableDbNameCombo); - dbListModel->setSortMode(DbListModel::SortMode::Alphabetical); + dbListModel->setSortMode(DbListModel::SortMode::AlphabeticalCaseInsensitive); tablesModel = new DbObjListModel(this); tablesModel->setType(DbObjListModel::ObjectType::TABLE); + tablesModel->setSortMode(DbObjListModel::SortMode::AlphabeticalCaseInsensitive); connect(this, SIGNAL(tablePageCompleteChanged()), ui->tablePage, SIGNAL(completeChanged())); } @@ -295,6 +304,9 @@ void ExportDialog::tablePageDisplayed() if (table.isNull()) // table mode selected by user, not forced by setTableMode(). { ui->exportTableDbNameCombo->setModel(dbListModel); + if (db) + ui->exportTableDbNameCombo->setCurrentText(db->getName()); + connect(ui->exportTableDbNameCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(updateDbTables())); ui->exportTableNameCombo->setModel(tablesModel); @@ -313,6 +325,9 @@ void ExportDialog::queryPageDisplayed() if (query.isNull()) // query mode selected by user, not forced by setQueryMode(). { ui->queryDatabaseCombo->setModel(dbListModel); + if (db) + ui->queryDatabaseCombo->setCurrentText(db->getName()); + connect(ui->queryDatabaseCombo, SIGNAL(currentIndexChanged(int)), ui->queryPage, SIGNAL(completeChanged())); } |
