Merge pull request #3303 from cg2121/multiview-update-fix
UI: Fix multiview update regressionmaster
commit
d1bc5eebc7
|
@ -106,7 +106,11 @@ void SceneTree::startDrag(Qt::DropActions supportedActions)
|
|||
void SceneTree::dropEvent(QDropEvent *event)
|
||||
{
|
||||
QListWidget::dropEvent(event);
|
||||
if (event->source() == this && gridMode) {
|
||||
|
||||
if (event->source() != this)
|
||||
return;
|
||||
|
||||
if (gridMode) {
|
||||
int scrollWid = verticalScrollBar()->sizeHint().width();
|
||||
int h = visualItemRect(item(count() - 1)).bottom();
|
||||
|
||||
|
@ -131,6 +135,8 @@ void SceneTree::dropEvent(QDropEvent *event)
|
|||
setCurrentItem(item);
|
||||
resize(size());
|
||||
}
|
||||
|
||||
emit scenesReordered();
|
||||
}
|
||||
|
||||
void SceneTree::dragMoveEvent(QDragMoveEvent *event)
|
||||
|
|
|
@ -34,4 +34,7 @@ protected:
|
|||
virtual void dragMoveEvent(QDragMoveEvent *event) override;
|
||||
virtual void rowsInserted(const QModelIndex &parent, int start,
|
||||
int end) override;
|
||||
|
||||
signals:
|
||||
void scenesReordered();
|
||||
};
|
||||
|
|
|
@ -408,11 +408,8 @@ OBSBasic::OBSBasic(QWidget *parent)
|
|||
connect(ui->enablePreviewButton, SIGNAL(clicked()), this,
|
||||
SLOT(TogglePreview()));
|
||||
|
||||
connect(ui->scenes->model(),
|
||||
SIGNAL(rowsMoved(QModelIndex, int, int, QModelIndex, int)),
|
||||
this,
|
||||
SLOT(ScenesReordered(const QModelIndex &, int, int,
|
||||
const QModelIndex &, int)));
|
||||
connect(ui->scenes, SIGNAL(scenesReordered()), this,
|
||||
SLOT(ScenesReordered()));
|
||||
}
|
||||
|
||||
static void SaveAudioDevice(const char *name, int channel, obs_data_t *parent,
|
||||
|
@ -8232,15 +8229,8 @@ void OBSBasic::CheckDiskSpaceRemaining()
|
|||
}
|
||||
}
|
||||
|
||||
void OBSBasic::ScenesReordered(const QModelIndex &parent, int start, int end,
|
||||
const QModelIndex &destination, int row)
|
||||
void OBSBasic::ScenesReordered()
|
||||
{
|
||||
UNUSED_PARAMETER(parent);
|
||||
UNUSED_PARAMETER(start);
|
||||
UNUSED_PARAMETER(end);
|
||||
UNUSED_PARAMETER(destination);
|
||||
UNUSED_PARAMETER(row);
|
||||
|
||||
OBSProjector::UpdateMultiviewProjectors();
|
||||
}
|
||||
|
||||
|
|
|
@ -662,8 +662,7 @@ private slots:
|
|||
void CheckDiskSpaceRemaining();
|
||||
void OpenSavedProjector(SavedProjectorInfo *info);
|
||||
|
||||
void ScenesReordered(const QModelIndex &parent, int start, int end,
|
||||
const QModelIndex &destination, int row);
|
||||
void ScenesReordered();
|
||||
|
||||
void ResetStatsHotkey();
|
||||
|
||||
|
|
Loading…
Reference in New Issue