forked from qt-creator/qt-creator
QmlDesigner: Hide warning when name not modified
Change-Id: I6f52375d029e575582dc8f16abc50c15727bf287 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
committed by
Henning Gründl
parent
23edbb0e19
commit
ec7cd3051a
@@ -1072,6 +1072,9 @@ Rectangle {
|
|||||||
|
|
||||||
DSC.TextField {
|
DSC.TextField {
|
||||||
id: overlayTextField
|
id: overlayTextField
|
||||||
|
|
||||||
|
property string previousText
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
leftPadding: root.leftPadding + (overlayIcon.visible ? overlayIcon.width + 8 : 0)
|
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
|
// Revoke active focus from text field by forcing active focus on another item
|
||||||
tableView.forceActiveFocus()
|
tableView.forceActiveFocus()
|
||||||
|
|
||||||
|
if (!result && overlayTextField.previousText !== overlayTextField.text)
|
||||||
if (!result)
|
|
||||||
overlayInvalid.showHeaderData(overlay.section, overlay.orientation)
|
overlayInvalid.showHeaderData(overlay.section, overlay.orientation)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1148,6 +1150,8 @@ Rectangle {
|
|||||||
overlayTextField.text = tableView.model.headerData(section,
|
overlayTextField.text = tableView.model.headerData(section,
|
||||||
orientation,
|
orientation,
|
||||||
CollectionModel.EditRole)
|
CollectionModel.EditRole)
|
||||||
|
overlayTextField.previousText = overlayTextField.text
|
||||||
|
|
||||||
overlayTextField.forceActiveFocus()
|
overlayTextField.forceActiveFocus()
|
||||||
overlayTextField.selectAll()
|
overlayTextField.selectAll()
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user