From 3420e4bdaf7f932230cded2c84e48d4799e04ac6 Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Mon, 24 Jan 2022 18:59:59 +0100 Subject: [PATCH 1/3] Store geometry for edit init code dialog --- src/gui/vector/qgsattributesforminitcode.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/vector/qgsattributesforminitcode.cpp b/src/gui/vector/qgsattributesforminitcode.cpp index 8ab9fd4693b5..0a1ee8791999 100644 --- a/src/gui/vector/qgsattributesforminitcode.cpp +++ b/src/gui/vector/qgsattributesforminitcode.cpp @@ -16,12 +16,14 @@ #include "qgsattributesforminitcode.h" #include "ui_qgsattributesforminitcode.h" #include "qgssettings.h" +#include "qgsgui.h" #include QgsAttributesFormInitCode::QgsAttributesFormInitCode() { setupUi( this ); + QgsGui::enableAutoGeometryRestore( this ); // Init function stuff mInitCodeSourceComboBox->addItem( QString() ); From 3b42823291ccf7f495d81dd18ad59dcf7e7bc0e7 Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Mon, 24 Jan 2022 19:01:11 +0100 Subject: [PATCH 2/3] Improve init code warning wording References https://github.com/qgis/QGIS/issues/46974 --- src/gui/qgsgui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/qgsgui.cpp b/src/gui/qgsgui.cpp index f3eb10c23d12..6d95f8d01bdf 100644 --- a/src/gui/qgsgui.cpp +++ b/src/gui/qgsgui.cpp @@ -332,7 +332,7 @@ bool QgsGui::pythonMacroAllowed( void ( *lambda )(), QgsMessageBar *messageBar ) { QMessageBox msgBox( QMessageBox::Information, tr( "Python Macros" ), tr( "Python macros are currently disabled. Do you allow this macro to run?" ) ); - QAbstractButton *stopSessionButton = msgBox.addButton( tr( "Don't Ask Anymore" ), QMessageBox::DestructiveRole ); + QAbstractButton *stopSessionButton = msgBox.addButton( tr( "Disable for this session" ), QMessageBox::DestructiveRole ); msgBox.addButton( tr( "No" ), QMessageBox::NoRole ); QAbstractButton *yesButton = msgBox.addButton( tr( "Yes" ), QMessageBox::YesRole ); msgBox.exec(); From 50848fd36fb4bb459b71e8046d01c98faa2cf305 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Tue, 25 Jan 2022 06:36:29 +1000 Subject: [PATCH 3/3] Update src/gui/qgsgui.cpp --- src/gui/qgsgui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/qgsgui.cpp b/src/gui/qgsgui.cpp index 6d95f8d01bdf..ffa987000198 100644 --- a/src/gui/qgsgui.cpp +++ b/src/gui/qgsgui.cpp @@ -332,7 +332,7 @@ bool QgsGui::pythonMacroAllowed( void ( *lambda )(), QgsMessageBar *messageBar ) { QMessageBox msgBox( QMessageBox::Information, tr( "Python Macros" ), tr( "Python macros are currently disabled. Do you allow this macro to run?" ) ); - QAbstractButton *stopSessionButton = msgBox.addButton( tr( "Disable for this session" ), QMessageBox::DestructiveRole ); + QAbstractButton *stopSessionButton = msgBox.addButton( tr( "Disable for this Session" ), QMessageBox::DestructiveRole ); msgBox.addButton( tr( "No" ), QMessageBox::NoRole ); QAbstractButton *yesButton = msgBox.addButton( tr( "Yes" ), QMessageBox::YesRole ); msgBox.exec();