提交 6af48130 编写于 作者: J jp9000

UI: Fix bug where items can't be deleted in last scene

Bug introduced in jp9000/obs-studio#861
上级 3774a73f
......@@ -2140,13 +2140,15 @@ void OBSBasic::DeactivateAudioSource(OBSSource source)
bool OBSBasic::QueryRemoveSource(obs_source_t *source)
{
int count = ui->scenes->count();
if (obs_source_get_type(source) == OBS_SOURCE_TYPE_SCENE) {
int count = ui->scenes->count();
if (count == 1) {
QMessageBox::information(this,
QTStr("FinalScene.Title"),
QTStr("FinalScene.Text"));
return false;
if (count == 1) {
QMessageBox::information(this,
QTStr("FinalScene.Title"),
QTStr("FinalScene.Text"));
return false;
}
}
const char *name = obs_source_get_name(source);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册