Skip to content
Browse files
Disable current cell on editing off
because otherwise on single cell change the change would not been stored in mEditBuffer

fixes #15975
  • Loading branch information
signedav committed Nov 21, 2018
1 parent b089b57 commit 51ee71316f7ca187fca2c78659922b798c5e87ef
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/app/qgsattributetabledialog.cpp
@@ -875,6 +875,12 @@ void QgsAttributeTableDialog::mActionToggleEditing_toggled( bool )
if ( !mLayer )

//this has to be done, because in case only one cell has been changed and is still enabled, the change
//would not be added to the mEditBuffer. By disabling, it looses focus and the change will be stored.
if ( mLayer->isEditable() && mMainView->tableView()->indexWidget( mMainView->tableView()->currentIndex() ) )
mMainView->tableView()->indexWidget( mMainView->tableView()->currentIndex() )->setEnabled( false );

if ( !QgisApp::instance()->toggleEditing( mLayer ) )
// restore gui state if toggling was canceled or layer commit/rollback failed

0 comments on commit 51ee713

Please sign in to comment.