Bug 278417 - No warning when going to Design View and have pending record changes in Data
Summary: No warning when going to Design View and have pending record changes in Data
Status: CLOSED FIXED
Alias: None
Product: KEXI
Classification: Unclassified
Component: Forms (show other bugs)
Version: 2.4 alpha3 (Calligra 2.4 alpha3)
Platform: Compiled Sources Linux
: NOR major (vote)
Target Milestone: ---
Assignee: Jarosław Staniek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-24 20:39 UTC by Dimitrios T Tanis
Modified: 2012-08-11 11:45 UTC (History)
0 users

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 Dimitrios T Tanis 2011-07-24 20:39:52 UTC
Version:           2.4 alpha3 (Calligra 2.4 alpha3) (using KDE 4.6.0) 
OS:                Linux

When editing data (in Data view that is) and hit Design BEFORE commiting changes, you switch to design view and changes are commited to the table without any confirmation dialog, whether to save or not changes made to the record.

Reproducible: Always

Steps to Reproduce:
Open a form at data view.
Change some data but DON'T click Save Row.
Click Design.
Click Data again.
View previous record.

Actual Results:  
The record is saved when going from data to design view, without showing the user a confirmation dialog whether he wants to save changes made or discard them.

Expected Results:  
When trying to switch view, when a record has been altered, there should be a dialog prompting the user whether he wants the changes made to be commited to the DB or discarded before switching the view.

Inform if I have mistakenly filed this as Major bug.
Comment 1 Jarosław Staniek 2011-07-25 19:24:07 UTC
Major issue indeed.
Comment 2 Jarosław Staniek 2011-08-03 22:45:04 UTC
Git commit 5b1b194ffd47521babab85ac3d33a89d0fff2309 by Jaroslaw Staniek.
Committed on 04/08/2011 at 00:40.
Pushed by staniek into branch 'master'.

Show confirmation when going to Design and have changes in table or form
BUG:278417

M  +30   -1    kexi/core/KexiView.h
M  +16   -1    kexi/core/KexiView.cpp
M  +1    -1    kexi/widget/tableview/kexidataawareobjectiface.h
M  +1    -1    kexi/widget/kexidatatable.h
M  +16   -2    kexi/widget/kexidataawareview.h
M  +29   -6    kexi/widget/kexidataawareview.cpp
M  +27   -1    kexi/core/KexiWindow.cpp
M  +5    -0    kexi/doc/dev/CHANGELOG-Kexi-js
M  +3    -3    kexi/widget/tableview/kexidataawareobjectiface.cpp
M  +1    -1    kexi/core/KexiWindow.h

http://commits.kde.org/calligra/5b1b194ffd47521babab85ac3d33a89d0fff2309
Comment 3 Jarosław Staniek 2011-08-03 22:45:56 UTC
OK, please test.
Comment 4 Dimitrios T Tanis 2011-08-08 20:51:48 UTC
Ok, Behaviour is as expected now. 
However, when editing a field (both in table and form) and deleting changes made, there is no confirmation dialog.
This behaviour may be confusing. Before switching, how is it determined if the dialog should be displayed, with data comparison or a dirty bit set on changed fields?
I suspect a dirty flag, but this seems weird because, Kexi seems clever enough to find out that although a field is dirty, changes are reverted and thus no dialog is displayed. However Save/Cancel record buttons are enabled even in this case.
So I believe that we should set a homogenous condition.
Having a dirty field SHOULD or NOT prompt to save changes, even they are reverted before saving. This should apply to both the confirmation dialog AND the Save/Cancel record buttons.
Comment 5 Jarosław Staniek 2011-08-08 21:10:13 UTC
Thanks for extra checks, Dimitros. We used 'field's value comparison' function, the same that is used on row saving to recognize if the value has really been changed. Indeed save/cancel actions can be updated using the same function, so I am reopening the bug.
Comment 6 Jarosław Staniek 2011-08-12 20:36:37 UTC
Git commit 7d990d093c95c75a3674cb85120e9faf5035a1fb by Jaroslaw Staniek.
Committed on 12/08/2011 at 22:35.
Pushed by staniek into branch 'kexi-modern_menu-staniek'.

Disable "Save Record Changes" action when user cancels editing

General
*Cleanups in API of the data-aware view
*Disable "Save Record Changes" action when user cancels editing or reverts edited text to the original value.
 "Cancel Record Changes" action is not disabled though,  so user is still able to exit from record editing mode.
BUG:278417

M  +1    -0    kexi/widget/tableview/kexiinputtableedit.h
M  +22   -8    kexi/widget/tableview/kexitableview.cpp
M  +29   -6    kexi/widget/tableview/kexidataawareobjectiface.h
M  +27   -0    kexi/kexidb/roweditbuffer.cpp
M  +2    -0    kexi/widget/kexidataawareview.h
M  +3    -3    kexi/plugins/forms/kexiformscrollview.cpp
M  +9    -0    kexi/kexidb/roweditbuffer.h
M  +20   -6    kexi/widget/kexidataawareview.cpp
M  +13   -2    kexi/widget/tableview/kexitableview.h
M  +3    -2    kexi/plugins/forms/kexiformscrollview.h
M  +6    -0    kexi/doc/dev/CHANGELOG-Kexi-js
M  +12   -1    kexi/widget/tableview/kexidataawareobjectiface.cpp
M  +5    -0    kexi/widget/tableview/kexibooltableedit.cpp
M  +8    -0    kexi/widget/tableview/kexiinputtableedit.cpp

http://commits.kde.org/calligra/7d990d093c95c75a3674cb85120e9faf5035a1fb
Comment 7 Jarosław Staniek 2011-08-12 20:42:26 UTC
Git commit e3db10e1031b1a4f8dfb372b6b1069b5a6d2b951 by Jaroslaw Staniek.
Committed on 12/08/2011 at 22:35.
Pushed by staniek into branch 'master'.

Disable "Save Record Changes" action when user cancels editing

General
*Cleanups in API of the data-aware view
*Disable "Save Record Changes" action when user cancels editing or reverts edited text to the original value.
 "Cancel Record Changes" action is not disabled though,  so user is still able to exit from record editing mode.
BUG:278417

M  +1    -0    kexi/widget/tableview/kexiinputtableedit.h
M  +22   -8    kexi/widget/tableview/kexitableview.cpp
M  +29   -6    kexi/widget/tableview/kexidataawareobjectiface.h
M  +27   -0    kexi/kexidb/roweditbuffer.cpp
M  +2    -0    kexi/widget/kexidataawareview.h
M  +3    -3    kexi/plugins/forms/kexiformscrollview.cpp
M  +9    -0    kexi/kexidb/roweditbuffer.h
M  +20   -6    kexi/widget/kexidataawareview.cpp
M  +13   -2    kexi/widget/tableview/kexitableview.h
M  +3    -2    kexi/plugins/forms/kexiformscrollview.h
M  +6    -0    kexi/doc/dev/CHANGELOG-Kexi-js
M  +12   -1    kexi/widget/tableview/kexidataawareobjectiface.cpp
M  +5    -0    kexi/widget/tableview/kexibooltableedit.cpp
M  +8    -0    kexi/widget/tableview/kexiinputtableedit.cpp

http://commits.kde.org/calligra/e3db10e1031b1a4f8dfb372b6b1069b5a6d2b951
Comment 8 Jarosław Staniek 2011-08-12 20:42:26 UTC
Git commit b51bc33ae81572b0f9fde8ecfc5a943afb43344e by Jaroslaw Staniek.
Committed on 12/08/2011 at 22:41.
Pushed by staniek into branch 'master'.

Show confirmation when going to Design and have changes in table or form
BUG:278417

Conflicts:

	kexi/doc/dev/CHANGELOG-Kexi-js

M  +0    -4    kexi/doc/dev/CHANGELOG-Kexi-js

http://commits.kde.org/calligra/b51bc33ae81572b0f9fde8ecfc5a943afb43344e
Comment 9 Inge Wallin 2011-08-16 08:09:49 UTC
Git commit 520d373bff309678d06f789a515ffbe163456a9f by Inge Wallin, on behalf of Jaroslaw Staniek.
Committed on 12/08/2011 at 22:35.
Pushed by ingwa into branch 'nondestructive-unavail-leinir'.

Disable "Save Record Changes" action when user cancels editing

General
*Cleanups in API of the data-aware view
*Disable "Save Record Changes" action when user cancels editing or reverts edited text to the original value.
 "Cancel Record Changes" action is not disabled though,  so user is still able to exit from record editing mode.
BUG:278417

M  +1    -0    kexi/widget/tableview/kexiinputtableedit.h
M  +22   -8    kexi/widget/tableview/kexitableview.cpp
M  +29   -6    kexi/widget/tableview/kexidataawareobjectiface.h
M  +27   -0    kexi/kexidb/roweditbuffer.cpp
M  +2    -0    kexi/widget/kexidataawareview.h
M  +3    -3    kexi/plugins/forms/kexiformscrollview.cpp
M  +9    -0    kexi/kexidb/roweditbuffer.h
M  +20   -6    kexi/widget/kexidataawareview.cpp
M  +13   -2    kexi/widget/tableview/kexitableview.h
M  +3    -2    kexi/plugins/forms/kexiformscrollview.h
M  +6    -0    kexi/doc/dev/CHANGELOG-Kexi-js
M  +12   -1    kexi/widget/tableview/kexidataawareobjectiface.cpp
M  +5    -0    kexi/widget/tableview/kexibooltableedit.cpp
M  +8    -0    kexi/widget/tableview/kexiinputtableedit.cpp

http://commits.kde.org/calligra/520d373bff309678d06f789a515ffbe163456a9f
Comment 10 Inge Wallin 2011-08-16 08:09:49 UTC
Git commit 7ca866c19e25485f152e74d9fde236b17305ce3f by Inge Wallin, on behalf of Jaroslaw Staniek.
Committed on 12/08/2011 at 22:41.
Pushed by ingwa into branch 'nondestructive-unavail-leinir'.

Show confirmation when going to Design and have changes in table or form
BUG:278417

Conflicts:

	kexi/doc/dev/CHANGELOG-Kexi-js

M  +0    -4    kexi/doc/dev/CHANGELOG-Kexi-js

http://commits.kde.org/calligra/7ca866c19e25485f152e74d9fde236b17305ce3f