Browse Source

UI: Disable drag/drop on Linux scenes/sources (for now)

Due to a Qt issue on Linux, disable drag/drop on the scenes/sources list
on Linux for the time being.
jp9000 4 years ago
parent
commit
457adcedd3
2 changed files with 8 additions and 0 deletions
  1. 3 0
      UI/source-tree.cpp
  2. 5 0
      UI/window-basic-main.cpp

+ 3 - 0
UI/source-tree.cpp

@@ -883,8 +883,11 @@ Qt::ItemFlags SourceTreeModel::flags(const QModelIndex &index) const
 	obs_sceneitem_t *item = items[index.row()];
 	bool is_group = obs_sceneitem_is_group(item);
 
+	/* XXX: Disable drag/drop on Linux until Qt issues are fixed */
 	return QAbstractListModel::flags(index) | Qt::ItemIsEditable |
+#if defined(_WIN32) || defined(__APPLE__)
 	       Qt::ItemIsDragEnabled |
+#endif
 	       (is_group ? Qt::ItemIsDropEnabled : Qt::NoItemFlags);
 }
 

+ 5 - 0
UI/window-basic-main.cpp

@@ -233,6 +233,11 @@ OBSBasic::OBSBasic(QWidget *parent)
 	ui->previewDisabledWidget->setVisible(false);
 	ui->contextContainer->setStyle(new OBSProxyStyle);
 
+	/* XXX: Disable drag/drop on Linux until Qt issues are fixed */
+#if !defined(_WIN32) && !defined(__APPLE__)
+	ui->scenes->setDragDropMode(QAbstractItemView::NoDragDrop);
+#endif
+
 	startingDockLayout = saveState();
 
 	statsDock = new OBSDock();