Skip to content

Commit

Permalink
bug fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
VitorVieiraZ committed Jun 24, 2024
1 parent eb2b626 commit 3a69a7e
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 16 deletions.
2 changes: 1 addition & 1 deletion app/qml/components/private/MMBaseSingleLineInput.qml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ MMBaseInput {
// Do not let TextField calculate implicitWidth automatically based on background, it causes binding loops
implicitWidth: width

readOnly: root.editState === "readOnly" || root.editState === "disabled"
readOnly: root.editState === "readOnly" || root.editState === "disabled" && root.isAttributeEditable

// Ensure the text is scrolled to the beginning
Component.onCompleted: ensureVisible( 0 )
Expand Down
4 changes: 3 additions & 1 deletion app/qml/form/MMFormPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,9 @@ Page {
property var fieldWidget: model.EditorWidget
property var fieldConfig: model.EditorWidgetConfig

property bool fieldIsReadOnly: root.state === "readOnly" || !AttributeEditable
property bool fieldIsReadOnly: root.state === "readOnly"
property bool isAttributeEditable: AttributeEditable

property bool fieldShouldShowTitle: model.ShowName

property string fieldTitle: model.Name
Expand Down
5 changes: 3 additions & 2 deletions app/qml/form/editors/MMFormCalendarEditor.qml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ MMPrivateComponents.MMBaseSingleLineInput {
property bool _fieldValueIsNull: parent.fieldValueIsNull

property bool _fieldShouldShowTitle: parent.fieldShouldShowTitle
property bool _fieldIsReadOnly: parent.fieldIsReadOnly
property bool _fieldFormIsReadOnly: parent.fieldIsReadOnly
property bool _isAttributeEditable: parent.isAttributeEditable

property string _fieldTitle: parent.fieldTitle
property string _fieldErrorMessage: parent.fieldErrorMessage
Expand All @@ -58,7 +59,7 @@ MMPrivateComponents.MMBaseSingleLineInput {
hasCheckbox: _fieldRememberValueSupported
checkboxChecked: _fieldRememberValueState

readOnly: _fieldIsReadOnly
readOnly: _fieldFormIsReadOnly

onCheckboxCheckedChanged: {
root.rememberValueBoxClicked( checkboxChecked )
Expand Down
5 changes: 3 additions & 2 deletions app/qml/form/editors/MMFormNumberEditor.qml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ MMPrivateComponents.MMBaseSingleLineInput {
property bool _fieldValueIsNull: parent.fieldValueIsNull

property bool _fieldShouldShowTitle: parent.fieldShouldShowTitle
property bool _fieldIsReadOnly: parent.fieldIsReadOnly
property bool _fieldFormIsReadOnly: parent.fieldIsReadOnly
property bool _isAttributeEditable: parent.isAttributeEditable

property string _fieldTitle: parent.fieldTitle
property string _fieldErrorMessage: parent.fieldErrorMessage
Expand All @@ -41,7 +42,7 @@ MMPrivateComponents.MMBaseSingleLineInput {
signal rememberValueBoxClicked( bool state )

title: _fieldShouldShowTitle ? _fieldTitle : ""
readOnly: _fieldIsReadOnly
readOnly: _fieldFormIsReadOnly

errorMsg: _fieldErrorMessage
warningMsg: _fieldWarningMessage
Expand Down
5 changes: 3 additions & 2 deletions app/qml/form/editors/MMFormRelationReferenceEditor.qml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ MMPrivateComponents.MMBaseSingleLineInput {
property var _fieldConfig: parent.fieldConfig
property var _fieldActiveProject: parent.fieldActiveProject

property bool _fieldIsReadOnly: parent.fieldIsReadOnly
property bool _fieldFormIsReadOnly: parent.fieldIsReadOnly
property bool _isAttributeEditable: parent.isAttributeEditable

property bool _fieldShouldShowTitle: parent.fieldShouldShowTitle
property string _fieldTitle: parent.fieldTitle
Expand All @@ -45,7 +46,7 @@ MMPrivateComponents.MMBaseSingleLineInput {
errorMsg: _fieldErrorMessage
warningMsg: _fieldWarningMessage

readOnly: _fieldIsReadOnly
readOnly: _fieldFormIsReadOnly

hasCheckbox: _fieldRememberValueSupported
checkboxChecked: _fieldRememberValueState
Expand Down
5 changes: 3 additions & 2 deletions app/qml/form/editors/MMFormScannerEditor.qml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ MMPrivateComponents.MMBaseSingleLineInput {
property bool _fieldValueIsNull: parent.fieldValueIsNull

property bool _fieldShouldShowTitle: parent.fieldShouldShowTitle
property bool _fieldIsReadOnly: parent.fieldIsReadOnly
property bool _fieldFormIsReadOnly: parent.fieldIsReadOnly
property bool _isAttributeEditable: parent.isAttributeEditable

property string _fieldTitle: parent.fieldTitle
property string _fieldErrorMessage: parent.fieldErrorMessage
Expand All @@ -45,7 +46,7 @@ MMPrivateComponents.MMBaseSingleLineInput {
warningMsg: _fieldWarningMessage
errorMsg: _fieldErrorMessage

readOnly: _fieldIsReadOnly
readOnly: _fieldFormIsReadOnly

hasCheckbox: _fieldRememberValueSupported
checkboxChecked: _fieldRememberValueState
Expand Down
5 changes: 3 additions & 2 deletions app/qml/form/editors/MMFormSliderEditor.qml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ MMPrivateComponents.MMBaseSingleLineInput {
property var _fieldConfig: parent.fieldConfig

property bool _fieldShouldShowTitle: parent.fieldShouldShowTitle
property bool _fieldIsReadOnly: parent.fieldIsReadOnly
property bool _fieldFormIsReadOnly: parent.fieldIsReadOnly
property bool _isAttributeEditable: parent.isAttributeEditable

property string _fieldTitle: parent.fieldTitle
property string _fieldErrorMessage: parent.fieldErrorMessage
Expand All @@ -45,7 +46,7 @@ MMPrivateComponents.MMBaseSingleLineInput {
warningMsg: _fieldWarningMessage
errorMsg: _fieldErrorMessage

readOnly: _fieldIsReadOnly
readOnly: _fieldFormIsReadOnly

hasCheckbox: _fieldRememberValueSupported
checkboxChecked: _fieldRememberValueState
Expand Down
5 changes: 3 additions & 2 deletions app/qml/form/editors/MMFormSwitchEditor.qml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ MMSwitchInput {
property var _fieldConfig: parent.fieldConfig

property bool _fieldShouldShowTitle: parent.fieldShouldShowTitle
property bool _fieldIsReadOnly: parent.fieldIsReadOnly
property bool _fieldFormIsReadOnly: parent.fieldIsReadOnly
property bool _isAttributeEditable: parent.isAttributeEditable

property string _fieldTitle: parent.fieldTitle
property string _fieldErrorMessage: parent.fieldErrorMessage
Expand All @@ -45,7 +46,7 @@ MMSwitchInput {
warningMsg: _fieldWarningMessage
errorMsg: _fieldErrorMessage

readOnly: _fieldIsReadOnly
readOnly: _fieldFormIsReadOnly

hasCheckbox: _fieldRememberValueSupported
checkboxChecked: _fieldRememberValueState
Expand Down
5 changes: 3 additions & 2 deletions app/qml/form/editors/MMFormTextEditor.qml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ MMPrivateComponents.MMBaseSingleLineInput {
property bool _fieldValueIsNull: parent.fieldValueIsNull

property bool _fieldShouldShowTitle: parent.fieldShouldShowTitle
property bool _fieldIsReadOnly: parent.fieldIsReadOnly
property bool _fieldFormIsReadOnly: parent.fieldIsReadOnly
property bool _isAttributeEditable: parent.isAttributeEditable

property string _fieldTitle: parent.fieldTitle
property string _fieldErrorMessage: parent.fieldErrorMessage
Expand All @@ -43,7 +44,7 @@ MMPrivateComponents.MMBaseSingleLineInput {

text: _fieldValue === undefined || _fieldValueIsNull ? '' : _fieldValue

readOnly: _fieldIsReadOnly
readOnly: _fieldFormIsReadOnly

title: _fieldShouldShowTitle ? _fieldTitle : ""

Expand Down
Binary file modified test/test_data/test_photo_rename/Survey_points.gpkg
Binary file not shown.

0 comments on commit 3a69a7e

Please sign in to comment.