mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Fix clicking, and don't allow dragging if not needed
When I changed the MouseArea into a TooltipArea, the clicking broke because the tooltip area doesn't catch mouse events. I could add another mouse area on top, but for better efficiency it's nice to re-use the TooltipArea. Just need to remember to allow clicking it. I also found a small issue where you could flick the table even if it's not big enough to scroll. This should fix that. Contributes to issue CURA-8686.
This commit is contained in:
parent
2294214bcf
commit
8de1f923a4
2 changed files with 4 additions and 0 deletions
|
@ -115,6 +115,7 @@ Item
|
||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
}
|
}
|
||||||
|
|
||||||
|
flickableDirection: Flickable.AutoFlickIfNeeded
|
||||||
clip: true
|
clip: true
|
||||||
ScrollBar.vertical: ScrollBar
|
ScrollBar.vertical: ScrollBar
|
||||||
{
|
{
|
||||||
|
@ -173,6 +174,7 @@ Item
|
||||||
{
|
{
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
|
acceptedButtons: Qt.LeftButton
|
||||||
text: (cellTextMetrics.elidedText == cellContent.text) ? "" : cellContent.text //Show full text in tooltip if it was elided.
|
text: (cellTextMetrics.elidedText == cellContent.text) ? "" : cellContent.text //Show full text in tooltip if it was elided.
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
|
|
|
@ -116,6 +116,7 @@ Item
|
||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
}
|
}
|
||||||
|
|
||||||
|
flickableDirection: Flickable.AutoFlickIfNeeded
|
||||||
clip: true
|
clip: true
|
||||||
ScrollBar.vertical: UM.ScrollBar {}
|
ScrollBar.vertical: UM.ScrollBar {}
|
||||||
columnWidthProvider: function(column)
|
columnWidthProvider: function(column)
|
||||||
|
@ -152,6 +153,7 @@ Item
|
||||||
{
|
{
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
|
acceptedButtons: Qt.LeftButton
|
||||||
text: (cellTextMetrics.elidedText == cellContent.text) ? "" : cellContent.text //Show full text in tooltip if it was elided.
|
text: (cellTextMetrics.elidedText == cellContent.text) ? "" : cellContent.text //Show full text in tooltip if it was elided.
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue