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

Fix #2599 - Save As dialog can save the wrong document #3388

Merged
merged 1 commit into from
Feb 12, 2023

Conversation

ntrel
Copy link
Member

@ntrel ntrel commented Feb 6, 2023

Fixes #2599.

@elextr
Copy link
Member

elextr commented Feb 6, 2023

LGBI

@ntrel
Copy link
Member Author

ntrel commented Feb 7, 2023

Ideally we would error when opening a file from the command line when there's a modal dialog open to prevent issues like this. I'm not sure if there's a way of detecting that without adding cases for each dialog.

@ntrel
Copy link
Member Author

ntrel commented Feb 7, 2023

There's still a case where Save As is used on the only empty new document, and the command line file replaces that document while the dialog is still open. But this fixes the other cases.

@elextr
Copy link
Member

elextr commented Feb 7, 2023

Well, in that unlikely situation all that is lost is a blank file so its ok, just confusing if the newly opened file is saved as/renamed.

@ntrel
Copy link
Member Author

ntrel commented Feb 12, 2023

This fix is superceded by #3395, but it's probably worth merging this also for resilience.

@eht16
Copy link
Member

eht16 commented Feb 12, 2023

Tested and works great. I agree that even with #3395, this cannot hurt. There might be more cases where the current doc differs from the doc the Save As dialog were open.

@eht16 eht16 merged commit e8a55b8 into geany:master Feb 12, 2023
@b4n b4n added this to the 1.39/2.0 milestone Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Save As dialog can save the wrong document
4 participants