Commit 4063f5f2 authored by Elias Steurer's avatar Elias Steurer 🇩🇪

Fix right click menu type

Fix banner type
Must be var to be able to hold
unsinged long long
parent c823c525
Pipeline #245104393 failed with stages
in 7 seconds
......@@ -188,7 +188,7 @@ Item {
itemIndex: index
onOpenContextMenu: {
// Set the menu to the current item informations
contextMenu.workshopID = delegate.workshopID
contextMenu.publishedFileID = delegate.publishedFileID
contextMenu.absoluteStoragePath = delegate.absoluteStoragePath
deleteDialog.currentItemIndex = itemIndex
......@@ -210,7 +210,7 @@ Item {
Menu {
id: contextMenu
property int workshopID: 0
property var publishedFileID: 0
property url absoluteStoragePath
MenuItem {
......@@ -224,7 +224,7 @@ Item {
MenuItem {
text: qsTr("Deinstall Item")
icon.source: "qrc:/assets/icons/icon_delete.svg"
enabled: contextMenu.workshopID === 0
enabled: contextMenu.publishedFileID === 0
onClicked: {
deleteDialog.open()
}
......@@ -232,11 +232,11 @@ Item {
MenuItem {
id: miWorkshop
text: qsTr("Open workshop Page")
enabled: contextMenu.workshopID !== 0
enabled: contextMenu.publishedFileID !== 0
icon.source: "qrc:/assets/icons/icon_steam.svg"
onClicked: {
Qt.openUrlExternally(
"steam://url/CommunityFilePage/" + workshopID)
"steam://url/CommunityFilePage/" + publishedFileID)
}
}
}
......
......@@ -17,7 +17,7 @@ Item {
property string absoluteStoragePath
property string type
property bool hasMenuOpen: false
property int workshopID: 0
property var publishedFileID: 0
property int itemIndex
property string screenId: ""
signal itemClicked(var screenId, var type, var isActive)
......
......@@ -34,7 +34,7 @@ Item {
function onWorkshopSearched() {
bannerTxt.text = Workshop.steamWorkshop.workshopListModel.getBannerText()
background.backgroundImage = Workshop.steamWorkshop.workshopListModel.getBannerUrl()
banner.bannerWorkshopID = Workshop.steamWorkshop.workshopListModel.getBannerID()
banner.bannerPublishedFileID = Workshop.steamWorkshop.workshopListModel.getBannerID()
bannerTxtUnderline.numberSubscriber
= Workshop.steamWorkshop.workshopListModel.getBannerAmountSubscriber()
}
......@@ -117,7 +117,7 @@ Item {
id: banner
height: 350
z: 5
property int bannerWorkshopID
property var bannerPublishedFileID
anchors {
top: parent.top
right: parent.right
......@@ -189,7 +189,7 @@ Item {
visible: false
onClicked: {
sidebar.setWorkshopItem(
workshopID, imgUrl,
publishedFileID, imgUrl,
additionalPreviewUrl,
subscriptionCount)
}
......@@ -199,7 +199,7 @@ Item {
MouseArea {
onClicked: Qt.openUrlExternally(
"steam://url/CommunityFilePage/"
+ banner.bannerWorkshopID)
+ banner.bannerPublishedFileID)
height: 30
width: bannerTxtOpenInSteam.paintedWidth
cursorShape: Qt.PointingHandCursor
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment