Skip to content

Commit

Permalink
fix drag'n'drop on windows + auto-select first item
Browse files Browse the repository at this point in the history
drag'n'drop issue on windows was fixed thanks to increasing the min row size of the text¨
  • Loading branch information
3nids committed May 4, 2021
1 parent b7d6d90 commit 30f7e99
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def updateUi(self):
self.mAttributeFormView.layout().addWidget(self.attribute_form)

self.update_buttons()
self.view.rootObject().clearIndex()
self.view.rootObject().setCurrentIndex(0)

def parentFormValueChanged(self, attribute, newValue):
if self.attribute_form:
Expand Down
9 changes: 7 additions & 2 deletions ordered_relation_editor/qml/OrderedImageList.qml
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ Rectangle {
Row {
id: row
anchors { fill: parent; margins: 2 }
Image { source: ImagePath; width: 50; fillMode: Image.PreserveAspectFit }
Text { text: Description }
Image { source: ImagePath; width: 50; fillMode: Image.PreserveAspectFit; visible: ImagePath !== "" }
Text { text: Description; height: 40; verticalAlignment: Text.AlignVCenter; padding: 4 }
}
}
DropArea {
Expand Down Expand Up @@ -122,4 +122,9 @@ Rectangle {
function currentIndex() {
return listView.currentIndex
}

function setCurrentIndex(i){
listView.currentIndex = i
orderedModel.onViewCurrentFeatureChanged(listView.currentIndex)
}
}

0 comments on commit 30f7e99

Please sign in to comment.