Commit a27cb1a1 authored by jan.koester's avatar jan.koester
Browse files

edit fix

parent 23c38c76
Loading
Loading
Loading
Loading
+16 −1
Original line number Diff line number Diff line
@@ -336,8 +336,23 @@ ColumnLayout {
                onActivated: {
                    var v = typeof((field.options || [])[currentIndex]) === "object"
                            ? field.options[currentIndex].value : field.options[currentIndex]
                    if (eKey === "media_ext" || eKey === "m_media_ext") {
                        var pfx = eKey.startsWith("m_") ? "m_" : ""
                        var curSrc = propPanel.currentProps[pfx + "src"] || ""
                        var dotIdx = curSrc.lastIndexOf(".")
                        if (dotIdx > 0) {
                            var newSrc = curSrc.substring(0, dotIdx + 1) + String(v)
                            var props = {}
                            props[eKey] = String(v)
                            props[pfx + "src"] = newSrc
                            propPanel.saveProperties(props)
                        } else {
                            propPanel.saveProperty(eKey, String(v))
                        }
                    } else {
                        propPanel.saveProperty(eKey, String(v))
                    }
                }
            }

            /* checkbox */