forked from qt-creator/qt-creator
QmlDesigner: Remove TextureSpecifics and fix new panes
MaterialPane now includes MaterialSection and TexturePane includes TextureSection. Removed those sections from any subtype specifics. Added hack to ignore specifics for Texture types. Fixes: QDS-14878 Change-Id: Iffea1be81dc7e12372434cee9135942c7c117082 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
@@ -1,15 +0,0 @@
|
|||||||
// Copyright (C) 2022 The Qt Company Ltd.
|
|
||||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
|
|
||||||
|
|
||||||
import QtQuick 2.15
|
|
||||||
import QtQuick.Layouts 1.15
|
|
||||||
import HelperWidgets 2.0
|
|
||||||
|
|
||||||
Column {
|
|
||||||
width: parent.width
|
|
||||||
|
|
||||||
// CubeMapTexture inherits Texture but doesn't provide any extra properties itself
|
|
||||||
TextureSection {
|
|
||||||
width: parent.width
|
|
||||||
}
|
|
||||||
}
|
|
@@ -11,8 +11,4 @@ Column {
|
|||||||
CustomMaterialSection {
|
CustomMaterialSection {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
}
|
}
|
||||||
|
|
||||||
MaterialSection {
|
|
||||||
width: parent.width
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -11,8 +11,4 @@ Column {
|
|||||||
DefaultMaterialSection {
|
DefaultMaterialSection {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
}
|
}
|
||||||
|
|
||||||
MaterialSection {
|
|
||||||
width: parent.width
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -112,6 +112,10 @@ Item {
|
|||||||
width: itemPane.width
|
width: itemPane.width
|
||||||
source: specificsUrl
|
source: specificsUrl
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MaterialSection {
|
||||||
|
width: itemPane.width
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -11,8 +11,4 @@ Column {
|
|||||||
PrincipledMaterialSection {
|
PrincipledMaterialSection {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
}
|
}
|
||||||
|
|
||||||
MaterialSection {
|
|
||||||
width: parent.width
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -11,8 +11,4 @@ Column {
|
|||||||
SpecularGlossyMaterialSection {
|
SpecularGlossyMaterialSection {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
}
|
}
|
||||||
|
|
||||||
MaterialSection {
|
|
||||||
width: parent.width
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -77,6 +77,10 @@ Rectangle {
|
|||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
source: specificsUrl
|
source: specificsUrl
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TextureSection {
|
||||||
|
width: itemPane.width
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,14 +0,0 @@
|
|||||||
// Copyright (C) 2021 The Qt Company Ltd.
|
|
||||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
|
|
||||||
|
|
||||||
import QtQuick 2.15
|
|
||||||
import QtQuick.Layouts 1.15
|
|
||||||
import HelperWidgets 2.0
|
|
||||||
|
|
||||||
Column {
|
|
||||||
width: parent.width
|
|
||||||
|
|
||||||
TextureSection {
|
|
||||||
width: parent.width
|
|
||||||
}
|
|
||||||
}
|
|
@@ -607,6 +607,10 @@ void PropertyEditorView::setupQmlBackend()
|
|||||||
|
|
||||||
auto [diffClassMetaInfo, qmlSpecificsFile] = diffType(commonAncestor, specificsClassMetaInfo);
|
auto [diffClassMetaInfo, qmlSpecificsFile] = diffType(commonAncestor, specificsClassMetaInfo);
|
||||||
|
|
||||||
|
// Hack to fix Textures in property views in case obsolete specifics are loaded from module
|
||||||
|
if (qmlFileUrl.toLocalFile().endsWith("TexturePane.qml"))
|
||||||
|
qmlSpecificsFile = QUrl{};
|
||||||
|
|
||||||
QString specificQmlData = getSpecificQmlData(commonAncestor, m_selectedNode, diffClassMetaInfo);
|
QString specificQmlData = getSpecificQmlData(commonAncestor, m_selectedNode, diffClassMetaInfo);
|
||||||
|
|
||||||
PropertyEditorQmlBackend *currentQmlBackend = getQmlBackend(m_qmlBackendHash,
|
PropertyEditorQmlBackend *currentQmlBackend = getQmlBackend(m_qmlBackendHash,
|
||||||
|
Reference in New Issue
Block a user