QmlDesigner: Hide warning when name not modified

Change-Id: I6f52375d029e575582dc8f16abc50c15727bf287
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Henning Gruendl
2025-04-03 12:16:20 +02:00
committed by Henning Gründl
parent 23edbb0e19
commit ec7cd3051a

View File

@@ -1072,6 +1072,9 @@ Rectangle {
DSC.TextField {
id: overlayTextField
property string previousText
anchors.fill: parent
leftPadding: root.leftPadding + (overlayIcon.visible ? overlayIcon.width + 8 : 0)
@@ -1092,8 +1095,7 @@ Rectangle {
// Revoke active focus from text field by forcing active focus on another item
tableView.forceActiveFocus()
if (!result)
if (!result && overlayTextField.previousText !== overlayTextField.text)
overlayInvalid.showHeaderData(overlay.section, overlay.orientation)
}
@@ -1148,6 +1150,8 @@ Rectangle {
overlayTextField.text = tableView.model.headerData(section,
orientation,
CollectionModel.EditRole)
overlayTextField.previousText = overlayTextField.text
overlayTextField.forceActiveFocus()
overlayTextField.selectAll()
}