mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
Merge pull request #8524 from signedav/editafteredit
[Bugfix] Release cell from focus on editing off
This commit is contained in:
commit
b6d9e0ba49
@ -875,6 +875,12 @@ void QgsAttributeTableDialog::mActionToggleEditing_toggled( bool )
|
||||
{
|
||||
if ( !mLayer )
|
||||
return;
|
||||
|
||||
//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
|
||||
|
Loading…
x
Reference in New Issue
Block a user