Skip to content
Snippets Groups Projects
Commit 5a06fc03 authored by Matthias Puchner's avatar Matthias Puchner
Browse files

simplify parenting with main window

parent 493744d5
No related branches found
No related tags found
1 merge request!302Simplify instrument linking
......@@ -57,15 +57,14 @@ bool LinkInstrumentManager::canLinkDataToInstrument(const RealDataItem* realData
GUI::View::ImportDataUtils::Compatible(*instrumentItem, *realDataItem);
if (!isCompatible) {
if (!quiet)
QMessageBox::warning(MainWindow::instance(), "Can't link to instrument",
QMessageBox::warning(baWin, "Can't link to instrument",
"Can't link, data is incompatible with the instrument.");
return false;
}
if (realDataItem->isSpecularData() && !realDataItem->hasNativeData()) {
if (!quiet)
QMessageBox::warning(MainWindow::instance(), "Can't link to instrument",
"Can't link, data is empty.");
QMessageBox::warning(baWin, "Can't link to instrument", "Can't link, data is empty.");
return false;
}
......
......@@ -111,4 +111,6 @@ private:
static MainWindow* s_instance;
};
#define baWin (MainWindow::instance())
#endif // BORNAGAIN_GUI_MAINWINDOW_MAINWINDOW_H
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment