Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacOS: Close Does Not Work #760

Open
ed-p-may opened this issue Oct 11, 2024 · 6 comments
Open

MacOS: Close Does Not Work #760

ed-p-may opened this issue Oct 11, 2024 · 6 comments

Comments

@ed-p-may
Copy link

Issue

On MacOS, the red 'close' button in the toolbar, and Command-Q do not work. Nothing happens when they are clicked / enetered. The only way to quit the application is to mouse-select File, then Exit

Screenshot 2024-10-11 at 9 36 49 AM

Expected Behavior

Should quit like a normal Mac application on Command-Q, red-close-button, or File/Exit

Environment

  • MacOS Sonoma 14.6.1
  • OpenStudio App 1.8.0
@ed-p-may ed-p-may added the Triage Issue needs to be assessed and labeled, further information on reported might be needed label Oct 11, 2024
@jmarrec
Copy link
Collaborator

jmarrec commented Oct 14, 2024

Works on Ubuntu at least.

We are overriding the closeEvent for the MainWindow.

void MainWindow::closeEvent(QCloseEvent* event) {
event->ignore();
if (isEnabled()) {
writeSettings();
emit closeClicked();
}
}

@jmarrec
Copy link
Collaborator

jmarrec commented Oct 14, 2024

Works on my M1 mac too, Sequoia 15.0, OpenstudioApp 1.8.0

close_mac

@jmarrec
Copy link
Collaborator

jmarrec commented Oct 14, 2024

Is the QMainWindow not being enabled when you try this? https://doc.qt.io/qt-6/qwidget.html#enabled-prop

@jmarrec jmarrec added resolution - Can't Reproduce ❔ component - UI Platform - Mac and removed Triage Issue needs to be assessed and labeled, further information on reported might be needed labels Oct 14, 2024
@jmarrec
Copy link
Collaborator

jmarrec commented Oct 14, 2024

Marking this as "Can't Reproduce" for now but not closing it (Otherwise at least in a couple of weeks if there hasn't been any activity I'll know I can close it)

If you can help us reproduce @ed-p-may that'd be great! A simple set of steps to reproduce the issue would go a long way.

Also, is this an Intel or an Arm (M-series) mac?

What I have tried:

  1. Launch OpenStudioApp 1.8.0
  2. Wait for the loading to finish, and the main window becomes enabled (no longer greyed out/locked)
  3. Either click the Red cross close button, or do CMD+Q. Both work

@ed-p-may
Copy link
Author

Thanks @jmarrec - I just did a reinstall and now it appears to be working as expected - thanks for taking a look! Seems to be working now though.

@ed-p-may
Copy link
Author

ed-p-may commented Nov 1, 2024

Hi @jmarrec , all,

I ran into this bug again just now. I think I identified when it happens for me:

  1. First, make sure that OSM-Application is completely closed / quit
  2. Select a valid .oms file in the Finder, double click the file to launch the Application
    Screenshot 2024-11-01 at 2 17 50 PM
  3. The Application launches, and asks you to to Save to Don't Save the current file. Select Don't Save
    Screenshot 2024-11-01 at 2 17 59 PM
  4. The file opens in OpenStudio App
  5. Now the red-dot and/or Command-Q are non-responsive. The only way to quite is to manually select File / Exit with the mouse.
    Screenshot 2024-11-01 at 2 18 05 PM

When I open the App first, and then open the file using File / Open, or if the the App is already open, and then I double-click the file, the quite all works as expected. It is only if the App is closed and I double-click a .osm file to launch it that I encounter this bug.

@ed-p-may

@ed-p-may ed-p-may reopened this Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants