forked from qt-creator/qt-creator
QmlDesigner: clear assets selection on focus out
Fixes: QDS-4625 Change-Id: I4a9ab829522d66e3644bba7d43845bbe82d0773b Reviewed-by: Miina Puuronen <miina.puuronen@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This commit is contained in:
@@ -64,9 +64,11 @@ Item {
|
||||
}
|
||||
|
||||
// called from C++ to close context menu on focus out
|
||||
function closeContextMenu()
|
||||
function handleViewFocusOut()
|
||||
{
|
||||
contextMenu.close()
|
||||
selectedAssets = {}
|
||||
selectedAssetsChanged()
|
||||
}
|
||||
|
||||
ScrollView { // TODO: experiment using ListView instead of ScrollView + Column
|
||||
|
@@ -88,7 +88,7 @@ bool ItemLibraryWidget::eventFilter(QObject *obj, QEvent *event)
|
||||
if (obj == m_itemViewQuickWidget.data())
|
||||
QMetaObject::invokeMethod(m_itemViewQuickWidget->rootObject(), "closeContextMenu");
|
||||
else if (obj == m_assetsWidget.data())
|
||||
QMetaObject::invokeMethod(m_assetsWidget->rootObject(), "closeContextMenu");
|
||||
QMetaObject::invokeMethod(m_assetsWidget->rootObject(), "handleViewFocusOut");
|
||||
} else if (event->type() == QMouseEvent::MouseMove) {
|
||||
if (m_itemToDrag.isValid()) {
|
||||
QMouseEvent *me = static_cast<QMouseEvent *>(event);
|
||||
|
Reference in New Issue
Block a user