Skip to content
Permalink
Browse files

fix bunch of small bugs

  • Loading branch information
tomasMizera authored and wonder-sk committed Nov 2, 2020
1 parent 45f12cb commit ed709c18fa6ab7d8dd4b41b2c121f89bca3a0637
Showing with 10 additions and 6 deletions.
  1. +1 −1 src/quickgui/plugin/editor/qgsquickrange.qml
  2. +9 −5 src/quickgui/plugin/qgsquickfeatureform.qml
@@ -151,7 +151,7 @@ Item {
Slider {
id: slider
visible: fieldItem.widgetStyle === "Slider"
value: fieldItem.parent.value
value: fieldItem.parent.value ? fieldItem.parent.value : 0
width: parent.width - valueLabel.width
height: fieldItem.height
implicitWidth: width
@@ -349,7 +349,7 @@ Item {
model: QgsQuick.SubModel {
id: contentModel
model: form.model
rootIndex: form.model.hasTabs ? form.model.index(currentIndex, 0) : undefined
rootIndex: form.model.hasTabs ? form.model.index(currentIndex, 0) : null
}

delegate: fieldItem
@@ -379,7 +379,7 @@ Item {
Label {
id: fieldLabel

text: qsTr(Name) || ''
text: Name ? qsTr(Name) : ''
font.bold: true
color: ConstraintSoftValid && ConstraintHardValid ? form.style.constraint.validColor : form.style.constraint.invalidColor
}
@@ -392,7 +392,7 @@ Item {
top: fieldLabel.bottom
}

text: qsTr(ConstraintDescription)
text: ConstraintDescription ? qsTr(ConstraintDescription) : ''
visible: !ConstraintHardValid || !ConstraintSoftValid
height: visible ? undefined : 0
wrapMode: Text.WordWrap
@@ -428,7 +428,11 @@ Item {

active: widget !== 'Hidden'

source: form.loadWidgetFn(widget.toLowerCase())
source: {
if ( widget )
return form.loadWidgetFn(widget.toLowerCase())
else return ''
}
}

Connections {
@@ -442,7 +446,7 @@ Item {
target: form
ignoreUnknownSignals: true
onSaved: {
if (typeof attributeEditorLoader.item.callbackOnSave === "function") {
if (attributeEditorLoader.item && typeof attributeEditorLoader.item.callbackOnSave === "function") {
attributeEditorLoader.item.callbackOnSave()
}
}

0 comments on commit ed709c1

Please sign in to comment.
You can’t perform that action at this time.