mirror of
https://github.com/MultiMC/MultiMC5.git
synced 2024-12-26 00:15:16 +00:00
GH-4812 Prefill instance name to allow making adjustments
Fills the instance name in instead of just setting a placeholder. This allows adjustments to be made to the suggested name without typing the whole thing out. The text is selected by default so that typing will overwrite the text, but users who want to adjust the default name instead of typing their own can deselect the text. The placeholder name is still set so it is still visible if the user deletes the text. Also sets the focus to the instance name textbox by default, whereas previously it was on the group name - this is required so the text gets overwritten on typing but also makes more sense generally. Closes issue #4812.
This commit is contained in:
parent
ff64d2ad59
commit
00589b247a
@ -151,6 +151,9 @@ void NewInstanceDialog::setSuggestedPack(const QString& name, InstanceTask* task
|
|||||||
{
|
{
|
||||||
creationTask.reset(task);
|
creationTask.reset(task);
|
||||||
ui->instNameTextBox->setPlaceholderText(name);
|
ui->instNameTextBox->setPlaceholderText(name);
|
||||||
|
ui->instNameTextBox->setText(name);
|
||||||
|
ui->instNameTextBox->selectAll();
|
||||||
|
ui->instNameTextBox->setFocus();
|
||||||
|
|
||||||
if(!task)
|
if(!task)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user