mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 14:44:13 -06:00
Move the rating logic outside of the rating widget
That way it's easier to re-use the component if that's ever required. CURA-6013
This commit is contained in:
parent
04f3601c27
commit
098adc45ff
2 changed files with 20 additions and 2 deletions
|
@ -19,6 +19,8 @@ Item
|
|||
|
||||
property int userRating: 0
|
||||
|
||||
signal rated(int rating)
|
||||
|
||||
width: contentRow.width
|
||||
height: contentRow.height
|
||||
MouseArea
|
||||
|
@ -94,8 +96,9 @@ Item
|
|||
onClicked:
|
||||
{
|
||||
// Ensure that the local rating is updated (even though it's not on the server just yet)
|
||||
_localRating = index + 1
|
||||
toolbox.ratePackage(ratingWidget.packageId, index + 1)
|
||||
//_localRating = index + 1
|
||||
rated(index + 1)
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue