Bug 340768

Summary: Newly created project shouldn't use window of previously opened project
Product: [Applications] KEXI Reporter: Friedrich W. H. Kossebau <kossebau>
Component: GeneralAssignee: Jarosław Staniek <staniek>
Status: CLOSED FIXED    
Severity: major    
Priority: NOR    
Version: 2.9 Alpha   
Target Milestone: 2.8.7   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 2.9.0 Beta 2
Sentry Crash Report:

Description Friedrich W. H. Kossebau 2014-11-08 19:38:56 UTC
When a db A is currently loaded, on creation of a new db B (via "Kexi"->"New...") the new db B seems to replace the db A in the same window, resulting in the Project Navigator now shows the data of db B.
This happens both if there have been unsaved changes to A or not.
Additionally the tables, queries, forms, etc. of A which have been opened before are continued to be shown.

Reproducible: Always

Steps to Reproduce:
1. Load existing db A
2. In the same window create a new db B, with "Kexi"->"New..."

Actual Results:  
New db B is shown in same window, with the Project Navigator listing content of the db B (well, nothing yet)
Views on tables, queries, etc. of A are still shown

Expected Results:  
A new Kexi window would have opened for the new db B.
Comment 1 Friedrich W. H. Kossebau 2014-11-08 20:28:01 UTC
Forgot some perhaps not obvious reproduction step:
1.1. Open some tables, forms, reports, etc., so they are displayed in views in the tabbed area
Comment 2 Jarosław Staniek 2014-11-28 21:46:02 UTC
So "newly created database shouldn't use window of previously opened database". In contrast previously opened database window is kept untouched when I *open* another database instead of *creating* it. New instance (window) of Kexi is created then. The same should happen in the case of creating.
Comment 3 Jarosław Staniek 2014-12-02 07:44:08 UTC
Git commit 06bd66fd1400768a1fec2d3d3984783b997467dc by Jaroslaw Staniek.
Committed on 01/12/2014 at 23:27.
Pushed by staniek into branch 'calligra/2.8'.

Newly created project shouldn't use window of previously opened project

Just close the existing project before

REVIEW:121321

M  +18   -12   kexi/main/KexiMainWindow.cpp
M  +1    -1    kexi/main/KexiMainWindow.h

http://commits.kde.org/calligra/06bd66fd1400768a1fec2d3d3984783b997467dc
Comment 4 Jarosław Staniek 2014-12-29 23:50:31 UTC
Git commit ddac97831fd834afa0edbaa3142be5e4a550bd92 by Jaroslaw Staniek.
Committed on 08/12/2014 at 13:25.
Pushed by staniek into branch 'calligra/2.9'.

Newly created project shouldn't use window of previously opened project

Unlike in 2.8 (https://git.reviewboard.kde.org/r/121321/) in case of server projects
we're starting a new Kexi instance and pass connection data file to its
--connection option and database name.
In case of file projects we're passing absolute file path.

M  +7    -12   kexi/core/KexiRecentProjects.cpp
M  +2    -3    kexi/core/KexiRecentProjects.h
M  +35   -17   kexi/core/kexidbconnectionset.cpp
M  +7    -3    kexi/core/kexidbconnectionset.h
M  +40   -49   kexi/main/KexiMainWindow.cpp
M  +3    -3    kexi/main/KexiMainWindow.h
M  +1    -1    kexi/main/startup/KexiNewProjectAssistant.cpp
M  +1    -1    kexi/main/startup/KexiNewProjectAssistant.h
M  +5    -2    kexi/migration/importwizard.cpp
M  +1    -3    kexi/widget/KexiConnectionSelectorWidget.cpp

http://commits.kde.org/calligra/ddac97831fd834afa0edbaa3142be5e4a550bd92