Skip to content


Merge pull request #8524 from signedav/editafteredit
Browse files Browse the repository at this point in the history
[Bugfix] Release cell from focus on editing off
  • Loading branch information
elpaso committed Nov 22, 2018
2 parents 256b580 + 51ee713 commit b6d9e0b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/app/qgsattributetabledialog.cpp
Expand Up @@ -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
Expand Down

0 comments on commit b6d9e0b

Please sign in to comment.