aboutsummaryrefslogtreecommitdiffstats
path: root/SQLiteStudio3/guiSQLiteStudio/windows/viewwindow.cpp
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2018-07-27 23:54:15 -0400
committerLibravatarUnit 193 <unit193@ubuntu.com>2018-07-27 23:54:15 -0400
commit6d3d39356473078c6b47e03b8a7616e4b34de928 (patch)
treefe5be2e6a08e4cfc73207746aba4c9fccfecfa10 /SQLiteStudio3/guiSQLiteStudio/windows/viewwindow.cpp
parentf98e49169a40876bcf1df832de6e908d1b350193 (diff)
parentfeda8a7db8d1d7c5439aa8f8feef7cc0dd2b59a0 (diff)
Update upstream source from tag 'upstream/3.2.1+dfsg1'
Update to upstream version '3.2.1+dfsg1' with Debian dir 5ea0333565de4dc898c062cc0ff4ba1153e2c1e4
Diffstat (limited to 'SQLiteStudio3/guiSQLiteStudio/windows/viewwindow.cpp')
-rw-r--r--SQLiteStudio3/guiSQLiteStudio/windows/viewwindow.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/SQLiteStudio3/guiSQLiteStudio/windows/viewwindow.cpp b/SQLiteStudio3/guiSQLiteStudio/windows/viewwindow.cpp
index be805af..c7ec7d8 100644
--- a/SQLiteStudio3/guiSQLiteStudio/windows/viewwindow.cpp
+++ b/SQLiteStudio3/guiSQLiteStudio/windows/viewwindow.cpp
@@ -259,6 +259,13 @@ void ViewWindow::init()
updateQueryToolbarStatus();
updateTriggersState();
updateColumnButtons();
+ updateAfterInit();
+}
+
+void ViewWindow::updateAfterInit()
+{
+ for (QWidget* tab : {ui->dataTab, ui->triggersTab})
+ ui->tabWidget->setTabEnabled(ui->tabWidget->indexOf(tab), existingView);
}
void ViewWindow::newView()
@@ -624,6 +631,7 @@ void ViewWindow::changesSuccessfullyCommitted()
initView();
updateQueryToolbarStatus();
updateWindowTitle();
+ updateAfterInit();
if (oldView.compare(view, Qt::CaseInsensitive) == 0)
notifyInfo(tr("Committed changes for view '%1' successfully.").arg(view));
@@ -874,7 +882,7 @@ void ViewWindow::refreshTriggers()
QTableWidgetItem* item = nullptr;
QString event;
int row = 0;
- foreach (SqliteCreateTriggerPtr trig, triggers)
+ for (SqliteCreateTriggerPtr trig : triggers)
{
item = new QTableWidgetItem(trig->trigger);
item->setFlags(Qt::ItemIsEnabled|Qt::ItemIsSelectable);
@@ -1017,10 +1025,10 @@ void ViewWindow::executeStructureChanges()
MessageListDialog dialog(tr("Following problems will take place while modifying the view.\n"
"Would you like to proceed?", "view window"));
dialog.setWindowTitle(tr("View modification", "view window"));
- foreach (const QString& error, viewModifier->getErrors())
+ for (const QString& error : viewModifier->getErrors())
dialog.addError(error);
- foreach (const QString& warn, viewModifier->getWarnings())
+ for (const QString& warn : viewModifier->getWarnings())
dialog.addWarning(warn);
if (dialog.exec() != QDialog::Accepted)