Bug 321029 - Project's second Javascript file not being saved.
Summary: Project's second Javascript file not being saved.
Status: RESOLVED FIXED
Alias: None
Product: Rocs
Classification: Applications
Component: general (show other bugs)
Version: 1.8.60
Platform: Compiled Sources Linux
: NOR critical
Target Milestone: ---
Assignee: Andreas Cord-Landwehr
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-11 15:08 UTC by mmellott
Modified: 2013-06-18 09:16 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 mmellott 2013-06-11 15:08:48 UTC
Project contains one script file already. Create a new script file, make changes to the file, save the project, and then close the project. When reopening the project, the second script file is nowhere to be found. It is not even referenced in the project's .rocs file.

Reproducible: Always

Steps to Reproduce:
1. Create a new empty project.
2. Save the project.
3. Create a new script file.
4. Make changes to both scripts.
5. Save the project.
6. Close Rocs.
7. Open Rocs.
Actual Results:  
Second script file is missing. Not written to file system and not referenced in the project's .rocs file.

Expected Results:  
Both script files are loaded into Rocs.

Rocs built from source with shortcuts patch. Original data loss was caused by a different but recent build though.
Comment 1 Andreas Cord-Landwehr 2013-06-18 09:16:55 UTC
Git commit 38a303bef84fb49c776fbabbc75f9e0fd1229952 by Andreas Cord-Landwehr, on behalf of Matthew Mellott.
Committed on 18/06/2013 at 11:12.
Pushed by cordlandwehr into branch 'master'.

Save code files of projects correctly.

Script files that were added to project after initial project creation
were not being saved. Upon reopening the project, these script files
would be missing and potentially irrecoverable. Script files were also
not being closed in the actual editor.

-Rocs now prompts user to name the untitled script that is created for
all new projects if the user decides to save the new project.
-Script files that are added to the project after initial project
creation are saved to it.
-When the user closes a project, script files open in the editor are now
closed.
-Scripts can now only be saved if the project has been saved.
-Scripts are given unique names to prevent files from being overwritten.
REVIEW: 110999

M  +11   -13   App/Ui/CodeEditor.cpp
M  +44   -14   App/Ui/MainWindow.cpp
M  +10   -1    App/Ui/MainWindow.h

http://commits.kde.org/rocs/38a303bef84fb49c776fbabbc75f9e0fd1229952