diff options
Diffstat (limited to 'share/qtcreator/qmldesigner/materialBrowserQmlSource/TextureBrowserContextMenu.qml')
-rw-r--r-- | share/qtcreator/qmldesigner/materialBrowserQmlSource/TextureBrowserContextMenu.qml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/share/qtcreator/qmldesigner/materialBrowserQmlSource/TextureBrowserContextMenu.qml b/share/qtcreator/qmldesigner/materialBrowserQmlSource/TextureBrowserContextMenu.qml index 658b7e7a51..714c004370 100644 --- a/share/qtcreator/qmldesigner/materialBrowserQmlSource/TextureBrowserContextMenu.qml +++ b/share/qtcreator/qmldesigner/materialBrowserQmlSource/TextureBrowserContextMenu.qml @@ -5,6 +5,7 @@ import QtQuick import HelperWidgets import StudioControls as StudioControls import StudioTheme as StudioTheme +import MaterialBrowserBackend StudioControls.Menu { id: root @@ -12,6 +13,8 @@ StudioControls.Menu { property var targetTexture: null property int copiedTextureInternalId: -1 + property var materialBrowserTexturesModel: MaterialBrowserBackend.materialBrowserTexturesModel + function popupMenu(targetTexture = null) { this.targetTexture = targetTexture @@ -30,7 +33,7 @@ StudioControls.Menu { StudioControls.MenuItem { text: qsTr("Apply to selected material") - enabled: root.targetTexture && materialBrowserModel.selectedIndex >= 0 + enabled: root.targetTexture && MaterialBrowserBackend.materialBrowserModel.selectedIndex >= 0 onTriggered: materialBrowserTexturesModel.applyToSelectedMaterial(root.targetTexture.textureInternalId) } |