Skip to content

Commit

Permalink
restore last used attribute table view when exiting multi-edit mode
Browse files Browse the repository at this point in the history
(fix #25099)
  • Loading branch information
alexbruy authored and nyalldawson committed May 21, 2020
1 parent 621d607 commit 0a6312d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/gui/attributetable/qgsdualview.cpp
Expand Up @@ -630,7 +630,12 @@ void QgsDualView::openConditionalStyles()
void QgsDualView::setMultiEditEnabled( bool enabled )
{
if ( enabled )
{
mPreviousView = view();
setView( AttributeEditor );
}
else
setView( mPreviousView );

mAttributeForm->setMode( enabled ? QgsAttributeEditorContext::MultiEditMode : QgsAttributeEditorContext::SingleEditMode );
}
Expand Down
1 change: 1 addition & 0 deletions src/gui/attributetable/qgsdualview.h
Expand Up @@ -431,6 +431,7 @@ class GUI_EXPORT QgsDualView : public QStackedWidget, private Ui::QgsDualViewBas
QgsFeature mTempAttributeFormFeature;
QgsFeatureIds mLastFeatureSet;
bool mBrowsingAutoPanScaleAllowed = true;
ViewMode mPreviousView;

friend class TestQgsDualView;
friend class TestQgsAttributeTable;
Expand Down

0 comments on commit 0a6312d

Please sign in to comment.