adopted for custom button handling.
This commit is contained in:
parent
32768bfdf4
commit
3e216cb6ea
@ -1417,18 +1417,18 @@ void PTextEdit::fileSavePrefs()
|
||||
QString msg("");
|
||||
QMessageBox msgBox;
|
||||
msgBox.setText("Which Preferences do you want to open?");
|
||||
msgBox.addButton("Default", QMessageBox::AcceptRole);
|
||||
msgBox.addButton("Custom", QMessageBox::AcceptRole);
|
||||
QAbstractButton *def = msgBox.addButton("Default", QMessageBox::AcceptRole);
|
||||
QAbstractButton *cust = msgBox.addButton("Custom", QMessageBox::AcceptRole);
|
||||
msgBox.setStandardButtons(QMessageBox::Cancel);
|
||||
int result = msgBox.exec();
|
||||
if (result == QMessageBox::Cancel) {
|
||||
return;
|
||||
} else if (result == 0) { // default dir
|
||||
} else if (msgBox.clickedButton() == def) { // default dir
|
||||
fln = fAdmin->getDefaultPrefPathName();
|
||||
msg = QString("Current Default Preferences Path-Name:\n") + fln;
|
||||
if (QMessageBox::information(this, "INFO", msg, QMessageBox::Ok, QMessageBox::Cancel) == QMessageBox::Cancel)
|
||||
return;
|
||||
} else if (result == 1) { // custom dir
|
||||
} else if (msgBox.clickedButton() == cust) { // custom dir
|
||||
fln = QFileDialog::getSaveFileName( this,
|
||||
tr( "Save Prefs As" ), "musredit_startup.xml",
|
||||
tr( "xml-Files (*.xml);;All Files (*)" ) );
|
||||
|
Loading…
x
Reference in New Issue
Block a user