mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-24 23:31:36 +08:00
Advise user he needs a scene before adding a source.
This commit is contained in:
@@ -46,6 +46,10 @@ Basic.Main.AddSceneDlg.Text="Please enter the name of the scene"
|
||||
Basic.SourceSelect.CreateNew="Create new"
|
||||
Basic.SourceSelect.AddExisting="Add Existing"
|
||||
|
||||
# no scene warning
|
||||
Basic.Main.AddSourceHelp.Title="Cannot Add Source"
|
||||
Basic.Main.AddSourceHelp.Text="You need to have at least 1 scene to add a source."
|
||||
|
||||
# basic mode main window
|
||||
Basic.Main.Scenes="Scenes"
|
||||
Basic.Main.Sources="Sources"
|
||||
|
||||
@@ -1045,8 +1045,14 @@ void OBSBasic::AddSourcePopupMenu(const QPoint &pos)
|
||||
bool foundValues = false;
|
||||
size_t idx = 0;
|
||||
|
||||
if (!GetCurrentScene())
|
||||
if (!GetCurrentScene()) {
|
||||
// Tell the user he needs a scene first (help beginners).
|
||||
QMessageBox::information(this,
|
||||
QTStr("Basic.Main.AddSourceHelp.Title"),
|
||||
QTStr("Basic.Main.AddSourceHelp.Text"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
QMenu popup;
|
||||
while (obs_enum_input_types(idx++, &type)) {
|
||||
|
||||
Reference in New Issue
Block a user