Bug 404162 - File/Save acts always acts like "Save as..."
Summary: File/Save acts always acts like "Save as..."
Status: RESOLVED FIXED
Alias: None
Product: kturtle
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR minor
Target Milestone: ---
Assignee: Cies Breijs
URL:
Keywords: junior-jobs
: 405199 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-02-10 00:47 UTC by Alexander Wessel
Modified: 2021-12-09 16:08 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Wessel 2019-02-10 00:47:56 UTC
File/Save acts always acts like "Save as..."

When saving an existing script, File/Save should automatically overwrite the existing file, but it always acts like File/Save As... The file requester dialog appears and overwriting the existing script must be confirmed always.

The existing script should simply be overwritten when using CTRL+S (File/Save).

This is likely similar to bug 156322 and bug 156328.

Version 0.8.1 beta on Linux 4.20.3-gentoo, compiled from the Gentoo kapps-turtle-18.12.1(5)(03:16:11 01/25/19) ebuild.
Comment 1 Alexander Wessel 2019-02-10 02:08:57 UTC
I just realized that this happens only to *new* scripts, not to scripts that have been opened before via "File/Open" or the Open... button.

So to reproduce:

1. File/New
2. File/Save - Dialog appears, save the file.
3. File/Save - Dialog appears again.
Comment 2 Christoph Feck 2019-03-09 16:13:16 UTC
setCurrentUrl() is only called for non-local URLs. Adding it for the case when saving to local URLs should be easy to add to https://cgit.kde.org/kturtle.git/tree/src/editor.cpp#n244
Comment 3 Mike Krutov 2019-03-14 19:50:17 UTC
I've put a small patch which fixes it for a review: https://phabricator.kde.org/D19769
Comment 4 Albert Astals Cid 2019-03-17 22:59:00 UTC
Git commit 036fffed7ae1a422f543c43160453db4c02c7c26 by Albert Astals Cid, on behalf of Mikhail Krutov.
Committed on 17/03/2019 at 22:57.
Pushed by aacid into branch 'Applications/19.04'.

Fix File/Save acts always acts like "Save as..."

Subscribers: apol, aacid, kde-edu

Tags: #kde_edu

Differential Revision: https://phabricator.kde.org/D19769

M  +21   -13   src/editor.cpp

https://invent.kde.org/kde/kturtle/commit/036fffed7ae1a422f543c43160453db4c02c7c26
Comment 5 Christoph Feck 2019-04-19 12:15:53 UTC
*** Bug 405199 has been marked as a duplicate of this bug. ***
Comment 6 Albert Astals Cid 2021-12-09 16:08:54 UTC
Git commit 1231d7ec0cca095d17dea5a5efedd89d67024ed5 by Albert Astals Cid, on behalf of Mikhail Krutov.
Committed on 17/03/2019 at 22:55.
Pushed by aacid into branch 'arcpatch-D19769'.

Fix File/Save acts always acts like "Save as..."

Subscribers: apol, aacid, kde-edu

Tags: #kde_edu

Differential Revision: https://phabricator.kde.org/D19769

M  +22   -13   src/editor.cpp

https://invent.kde.org/education/kturtle/commit/1231d7ec0cca095d17dea5a5efedd89d67024ed5