aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop/qmpsettingswindow.cpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2017-09-24 21:02:54 -0500
committerGravatar GitHub <noreply@github.com> 2017-09-24 21:02:54 -0500
commit48dd5f9fb11f0a2e69291271d9140ebcec640117 (patch)
treef517854c40ba9ea1056663006e664d628f778b8b /qmidiplayer-desktop/qmpsettingswindow.cpp
parent5b5eba7e68e7de8d442824d2f5076ec7d623e2b8 (diff)
parent78ba2cf12ec5ef08b8d69eec642db96390415c07 (diff)
downloadQMidiPlayer-48dd5f9fb11f0a2e69291271d9140ebcec640117.tar.xz
Merge pull request #5 from BLumia/master
Let MessageBox show at center of the current monitor
Diffstat (limited to 'qmidiplayer-desktop/qmpsettingswindow.cpp')
-rw-r--r--qmidiplayer-desktop/qmpsettingswindow.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/qmidiplayer-desktop/qmpsettingswindow.cpp b/qmidiplayer-desktop/qmpsettingswindow.cpp
index 985dd67..ba460dd 100644
--- a/qmidiplayer-desktop/qmpsettingswindow.cpp
+++ b/qmidiplayer-desktop/qmpsettingswindow.cpp
@@ -3,6 +3,7 @@
#include <QFileDialog>
#include <QDir>
#include <QMessageBox>
+#include <QDesktopWidget>
#include "qmpsettingswindow.hpp"
#include "ui_qmpsettingswindow.h"
#include "qmpmainwindow.hpp"
@@ -382,7 +383,9 @@ void qmpSettingsWindow::verifySF()
if(((QCheckBox*)ui->twSoundfont->cellWidget(i,0))->isChecked())++sf;
if(settings->value("Midi/DefaultOutput","Internal FluidSynth").toString()=="Internal FluidSynth"&&!sf)
{
- if(QMessageBox::question(this,
+ // blmark: show dialog at the current screen which user using now.
+ int curMonitor = QApplication::desktop()->screenNumber(this);
+ if(QMessageBox::question(QDesktopWidget().screen(curMonitor),//this,
tr("No soundfont loaded"),
tr("Internal fluidsynth was chosen as the default output but it has no soundfont set. "
"Would you like to setup soundfonts now? After that you may have to reload the internal synth."))==QMessageBox::Yes)