mirror of
https://github.com/lubosz/overte.git
synced 2025-04-09 06:04:42 +02:00
make results window raising optional
This commit is contained in:
parent
822af3365b
commit
26d13ce002
3 changed files with 9 additions and 4 deletions
|
@ -241,7 +241,9 @@ void DomainBakeWidget::handleBakerProgress(int baked, int total) {
|
|||
|
||||
if (it != _bakers.end()) {
|
||||
auto resultRow = it->second;
|
||||
auto resultsWindow = qApp->getMainWindow()->showResultsWindow();
|
||||
|
||||
// grab the results window, don't force it to be brought to the top
|
||||
auto resultsWindow = qApp->getMainWindow()->showResultsWindow(false);
|
||||
|
||||
int percentage = roundf(float(baked) / float(total) * 100.0f);
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ OvenMainWindow::~OvenMainWindow() {
|
|||
}
|
||||
}
|
||||
|
||||
ResultsWindow* OvenMainWindow::showResultsWindow() {
|
||||
ResultsWindow* OvenMainWindow::showResultsWindow(bool shouldRaise) {
|
||||
if (!_resultsWindow) {
|
||||
// we don't have a results window right now, so make a new one
|
||||
_resultsWindow = new ResultsWindow;
|
||||
|
@ -51,7 +51,10 @@ ResultsWindow* OvenMainWindow::showResultsWindow() {
|
|||
|
||||
// show the results window and make sure it is in front
|
||||
_resultsWindow->show();
|
||||
_resultsWindow->raise();
|
||||
|
||||
if (shouldRaise) {
|
||||
_resultsWindow->raise();
|
||||
}
|
||||
|
||||
// return a pointer to the results window the caller can use
|
||||
return _resultsWindow;
|
||||
|
|
|
@ -25,7 +25,7 @@ public:
|
|||
OvenMainWindow(QWidget *parent = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
~OvenMainWindow();
|
||||
|
||||
ResultsWindow* showResultsWindow();
|
||||
ResultsWindow* showResultsWindow(bool shouldRaise = true);
|
||||
|
||||
private:
|
||||
QPointer<ResultsWindow> _resultsWindow;
|
||||
|
|
Loading…
Reference in a new issue