Skip to content

Commit 0a6312d

Browse files
alexbruynyalldawson
authored andcommittedMay 21, 2020
restore last used attribute table view when exiting multi-edit mode
(fix #25099)
1 parent 621d607 commit 0a6312d

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed
 

‎src/gui/attributetable/qgsdualview.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,12 @@ void QgsDualView::openConditionalStyles()
630630
void QgsDualView::setMultiEditEnabled( bool enabled )
631631
{
632632
if ( enabled )
633+
{
634+
mPreviousView = view();
633635
setView( AttributeEditor );
636+
}
637+
else
638+
setView( mPreviousView );
634639

635640
mAttributeForm->setMode( enabled ? QgsAttributeEditorContext::MultiEditMode : QgsAttributeEditorContext::SingleEditMode );
636641
}

‎src/gui/attributetable/qgsdualview.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,7 @@ class GUI_EXPORT QgsDualView : public QStackedWidget, private Ui::QgsDualViewBas
431431
QgsFeature mTempAttributeFormFeature;
432432
QgsFeatureIds mLastFeatureSet;
433433
bool mBrowsingAutoPanScaleAllowed = true;
434+
ViewMode mPreviousView;
434435

435436
friend class TestQgsDualView;
436437
friend class TestQgsAttributeTable;

0 commit comments

Comments
 (0)
Please sign in to comment.