Commit 662c5b61 authored by Don Gagne's avatar Don Gagne

Remove goto style error handling overkill

parent 34e85677
......@@ -1085,10 +1085,9 @@ bool MainWindow::loadStyle(QGC_MAINWINDOW_STYLE style, QString cssFile)
} else {
qDebug() << "Unable to load master style sheet";
success = false;
goto Error;
}
if (cssFile != masterCssFile) {
if (success && cssFile != masterCssFile) {
// Load the slave user specified stylesheet.
QFile styleSheet(cssFile);
if (styleSheet.open(QIODevice::ReadOnly | QIODevice::Text))
......@@ -1114,11 +1113,9 @@ bool MainWindow::loadStyle(QGC_MAINWINDOW_STYLE style, QString cssFile)
} else {
qDebug() << "Unable to load slave style sheet:" << cssFile;
success = false;
goto Error;
}
}
Error:
// Finally restore the cursor before returning.
qApp->restoreOverrideCursor();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment