forked from qt-creator/qt-creator
QmlDesigner: Fix material browser context menu open issue
Allow opening material browser context menu when search is empty. Fixes: QDS-7837 Change-Id: I473b62d1f1b94a42d5c60f0e06a6d2b76b74ca6d Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
@@ -310,14 +310,12 @@ Item {
|
|||||||
height: root.cellHeight
|
height: root.cellHeight
|
||||||
|
|
||||||
onShowContextMenu: {
|
onShowContextMenu: {
|
||||||
if (searchBox.isEmpty()) {
|
|
||||||
root.currentMaterial = model
|
root.currentMaterial = model
|
||||||
cxtMenu.popup()
|
cxtMenu.popup()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
text: qsTr("No match found.");
|
text: qsTr("No match found.");
|
||||||
@@ -371,7 +369,6 @@ Item {
|
|||||||
height: root.cellHeight
|
height: root.cellHeight
|
||||||
|
|
||||||
onShowContextMenu: {
|
onShowContextMenu: {
|
||||||
if (searchBox.isEmpty()) {
|
|
||||||
root.currentBundleMaterial = modelData
|
root.currentBundleMaterial = modelData
|
||||||
cxtMenuBundle.popup()
|
cxtMenuBundle.popup()
|
||||||
}
|
}
|
||||||
@@ -380,7 +377,6 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: noMatchText
|
id: noMatchText
|
||||||
|
Reference in New Issue
Block a user