Skip to content

Commit

Permalink
CHanged default open directory to see if this fixes issue #29
Browse files Browse the repository at this point in the history
  • Loading branch information
RussellGarwood committed Nov 12, 2021
1 parent cbdc2e0 commit 4c9b663
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions SPIERSview/src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ void MainWindow::StartTimer_fired()
fname = QFileDialog::getOpenFileName(
this,
"Select " + QString(PRODUCTNAME) + " file",
"",
QStandardPaths::writableLocation(QStandardPaths::DesktopLocation),
QString(PRODUCTNAME) + " files (*.spv *.sp2 *spvf *.xml *.vaxml)");
FilterKeys = true;

Expand Down Expand Up @@ -2825,7 +2825,8 @@ void MainWindow::closeEvent(QCloseEvent *event)
msgBox.setDefaultButton(QMessageBox::Cancel);
int ret = msgBox.exec();

if (ret == QMessageBox::Yes) {
if (ret == QMessageBox::Yes)
{
QCoreApplication::quit();
}

Expand All @@ -2847,7 +2848,8 @@ void MainWindow::closeEvent(QCloseEvent *event)
event->accept();
QCoreApplication::quit();
}
else if (ret == QMessageBox::Cancel) {
else if (ret == QMessageBox::Cancel)
{
event->ignore();
return;
}
Expand Down Expand Up @@ -3999,9 +4001,12 @@ void MainWindow::on_actionFull_Screen_triggered()
// so need to know if it is already at full screen to return to it previous state on
// glwidget full screen close.
wasFullScreen = false;
if(isFullScreen()) {
if (isFullScreen())
{
wasFullScreen = true;
} else {
}
else
{
lastGeometry = geometry();
showFullScreen();
}
Expand All @@ -4022,7 +4027,8 @@ void MainWindow::on_actionFull_Screen_triggered()

#ifdef __APPLE__
// Return the main window back to it previosu state if needed
if(wasFullScreen == false) {
if (wasFullScreen == false)
{
showNormal();
setGeometry(lastGeometry);
}
Expand Down

0 comments on commit 4c9b663

Please sign in to comment.