UI: Set default maximum name length to 170 characters
As the names entered into this dialog can be used as part of file names (for example, saving a scene collection), allowing long names can result in silent data loss where OBS creates the collection and allows the user to manipulate it, but it cannot be saved on exit. This is due to the MAX_PATH limitation on Windows (260 characters). 170 was chosen to accomodate the length of the user app data folder plus some room for extensions like .json.tmp.master
parent
dd3ed096f8
commit
15770712a8
|
@ -40,7 +40,7 @@ bool NameDialog::AskForName(QWidget *parent, const QString &title,
|
|||
const QString &placeHolder, int maxSize)
|
||||
{
|
||||
if (maxSize <= 0 || maxSize > 32767)
|
||||
maxSize = 256;
|
||||
maxSize = 170;
|
||||
|
||||
NameDialog dialog(parent);
|
||||
dialog.setWindowTitle(title);
|
||||
|
|
|
@ -35,5 +35,5 @@ public:
|
|||
static bool AskForName(QWidget *parent, const QString &title,
|
||||
const QString &text, std::string &str,
|
||||
const QString &placeHolder = QString(""),
|
||||
int maxSize = 256);
|
||||
int maxSize = 170);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue