mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-24 23:31:36 +08:00
Auto suggest scene and source names.
NameDialog can have placeholder text. Localize scene number. Pre-select scene and source text.
This commit is contained in:
@@ -958,10 +958,14 @@ void OBSBasic::on_scenes_customContextMenuRequested(const QPoint &pos)
|
||||
void OBSBasic::on_actionAddScene_triggered()
|
||||
{
|
||||
string name;
|
||||
QString format{QTStr("Basic.Main.DefaultSceneName.Text")};
|
||||
QString placeHolderText = format.arg(ui->scenes->count() + 1);
|
||||
|
||||
bool accepted = NameDialog::AskForName(this,
|
||||
QTStr("MainWindow.AddSceneDlg.Title"),
|
||||
QTStr("MainWindow.AddSceneDlg.Text"),
|
||||
name);
|
||||
name,
|
||||
placeHolderText);
|
||||
|
||||
if (accepted) {
|
||||
if (name.empty()) {
|
||||
|
||||
Reference in New Issue
Block a user