Adding tooltips, fixing non translated "Create new object" object type
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
2d7c038b46
commit
77688fa715
3 changed files with 9 additions and 2 deletions
|
@ -96,6 +96,7 @@ Button {
|
||||||
//text: historyAction.getReadableString()
|
//text: historyAction.getReadableString()
|
||||||
|
|
||||||
ToolTip.visible: hovered
|
ToolTip.visible: hovered
|
||||||
|
ToolTip.delay: 200
|
||||||
ToolTip.text: label.text
|
ToolTip.text: label.text
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
|
|
@ -208,7 +208,9 @@ D.Dialog {
|
||||||
// Base, untranslated version of the model.
|
// Base, untranslated version of the model.
|
||||||
property var baseModel: visible ?
|
property var baseModel: visible ?
|
||||||
(selectObjMode ?
|
(selectObjMode ?
|
||||||
Objects.getObjectsName(modelData[1].objType).concat(isRealObject ? [qsTr("+ Create new %1").arg(modelData[1].objType)] : []) :
|
Objects.getObjectsName(modelData[1].objType).concat(
|
||||||
|
isRealObject ? [qsTr("+ Create new %1").arg(Objects.types[modelData[1].objType].displayType())] :
|
||||||
|
[]) :
|
||||||
modelData[1].values)
|
modelData[1].values)
|
||||||
: []
|
: []
|
||||||
// Translated verison of the model.
|
// Translated verison of the model.
|
||||||
|
@ -228,7 +230,8 @@ D.Dialog {
|
||||||
selectedObj = Objects.createNewRegisteredObject(modelData[1].objType)
|
selectedObj = Objects.createNewRegisteredObject(modelData[1].objType)
|
||||||
history.addToHistory(new HistoryLib.CreateNewObject(selectedObj.name, modelData[1].objType, selectedObj.export()))
|
history.addToHistory(new HistoryLib.CreateNewObject(selectedObj.name, modelData[1].objType, selectedObj.export()))
|
||||||
baseModel = Objects.getObjectsName(modelData[1].objType).concat(
|
baseModel = Objects.getObjectsName(modelData[1].objType).concat(
|
||||||
isRealObject ? [qsTr("+ Create new %1").arg(modelData[1].objType)] : [])
|
isRealObject ? [qsTr("+ Create new %1").arg(Objects.types[modelData[1].objType].displayType())] :
|
||||||
|
[])
|
||||||
currentIndex = baseModel.indexOf(selectedObj.name)
|
currentIndex = baseModel.indexOf(selectedObj.name)
|
||||||
}
|
}
|
||||||
selectedObj.requiredBy.push(Objects.currentObjects[objEditor.objType][objEditor.objIndex])
|
selectedObj.requiredBy.push(Objects.currentObjects[objEditor.objType][objEditor.objIndex])
|
||||||
|
|
|
@ -58,6 +58,9 @@ Column {
|
||||||
icon.width: 24
|
icon.width: 24
|
||||||
icon.height: 24
|
icon.height: 24
|
||||||
icon.color: sysPalette.buttonText
|
icon.color: sysPalette.buttonText
|
||||||
|
ToolTip.visible: hovered
|
||||||
|
ToolTip.delay: 200
|
||||||
|
ToolTip.text: text
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var newObj = Objects.createNewRegisteredObject(modelData)
|
var newObj = Objects.createNewRegisteredObject(modelData)
|
||||||
|
|
Loading…
Reference in a new issue