Skip to content

Commit

Permalink
Enable 'Edit Database Cell' when view is editable (sqlitebrowser#1756)
Browse files Browse the repository at this point in the history
  • Loading branch information
cristilupascu committed Mar 3, 2019
1 parent bede43f commit 3db0af5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/MainWindow.cpp
Expand Up @@ -1296,7 +1296,7 @@ void MainWindow::doubleClickTable(const QModelIndex& index)
return;
}

// * Don't allow editing of other objects than tables (on the browse table) *
// * Don't allow editing of other objects than tables and editable views
bool isEditingAllowed = !db.readOnly() && m_currentTabTableModel == m_browseTableModel &&
m_browseTableModel->isEditable();

Expand Down Expand Up @@ -1324,7 +1324,7 @@ void MainWindow::dataTableSelectionChanged(const QModelIndex& index)
bool editingAllowed = !db.readOnly() && (m_currentTabTableModel == m_browseTableModel) &&
m_browseTableModel->isEditable();

// Don't allow editing of other objects than tables
// Don't allow editing of other objects than tables and editable views
editDock->setReadOnly(!editingAllowed);

// If the Edit Cell dock is visible, load the new value into it
Expand Down

0 comments on commit 3db0af5

Please sign in to comment.