Advise user he needs a scene before adding a source.

master
Socapex 2014-05-09 18:08:23 -04:00
parent c76b7cbf3f
commit 978de126b3
2 changed files with 11 additions and 1 deletions

View File

@ -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"

View File

@ -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)) {