mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-03 16:58:24 +02:00
[ui] AttributeEditor: improve display of long floating point values
This commit is contained in:
parent
b85ff4d27f
commit
77fc562a1e
1 changed files with 11 additions and 1 deletions
|
@ -237,11 +237,21 @@ RowLayout {
|
|||
selectByMouse: true
|
||||
validator: attribute.type == "FloatParam" ? doubleValidator : intValidator
|
||||
onEditingFinished: setTextFieldAttribute(text)
|
||||
onAccepted: setTextFieldAttribute(text)
|
||||
onAccepted: {
|
||||
setTextFieldAttribute(text)
|
||||
// When the text is too long, display the left part
|
||||
// (with the most important values and cut the floating point details)
|
||||
ensureVisible(0)
|
||||
}
|
||||
Component.onDestruction: {
|
||||
if(activeFocus)
|
||||
setTextFieldAttribute(text)
|
||||
}
|
||||
Component.onCompleted: {
|
||||
// When the text is too long, display the left part
|
||||
// (with the most important values and cut the floating point details)
|
||||
ensureVisible(0)
|
||||
}
|
||||
}
|
||||
|
||||
Loader {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue