Browse Source

qml: fix invalid access

fixes warnings
pull/162/head
Prince Gupta 3 years ago
committed by Felix Paul Kühne
parent
commit
0cf847f0be
  1. 3
      modules/gui/qt/widgets/qml/GridItem.qml
  2. 3
      modules/gui/qt/widgets/qml/TableViewDelegate.qml

3
modules/gui/qt/widgets/qml/GridItem.qml

@ -206,6 +206,9 @@ T.ItemDelegate {
onPressed: {
_modifiersOnLastPress = mouse.modifiers
if (!drag.target)
return
const pos = drag.target.parent.mapFromItem(root, mouseX, mouseY)
drag.target.x = pos.x + VLCStyle.dragDelta
drag.target.y = pos.y + VLCStyle.dragDelta

3
modules/gui/qt/widgets/qml/TableViewDelegate.qml

@ -132,6 +132,9 @@ T.Control {
onPressed: {
_modifiersOnLastPress = mouse.modifiers
if (!drag.target)
return
const pos = drag.target.parent.mapFromItem(hoverArea, mouseX, mouseY);
drag.target.x = pos.x + VLCStyle.dragDelta;

Loading…
Cancel
Save