Bug 71265 - blank diagram is erroneously marked modified
Summary: blank diagram is erroneously marked modified
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-26 20:13 UTC by Oliver Kellogg
Modified: 2004-05-28 01:49 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
set modified patch. (218 bytes, patch)
2004-05-11 22:43 UTC, Raymond Bosman
Details
same patch but without the color codes (523 bytes, patch)
2004-05-12 01:12 UTC, Raymond Bosman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Kellogg 2003-12-26 20:13:58 UTC
Version:           CVS (using KDE KDE 3.1.1)

Start umbrello and open a diagram file.
Close the diagram without any modifications.
Umbrello will still ask "The diagram has been modified. Do
you wish to save..." This is especially annoying on the blank (default) diagram.
This only happens since a few days (CVS) and I think it
has something to do with the undo stack.
Comment 1 Jonathan Riddell 2003-12-27 03:08:34 UTC
This is caused by the UMLAssociation destructor (5 in backtrace) calling setModified.  I've no idea what deletes the association.  I suspected 'delete pObject' in UMLDoc::loadUMLObjectsFromXMI() but it doesn't seem to be that.

0: /usr/lib/libkdecore.so.4(_Z11kdBacktracei+0x45) [0x4078bb85]
1: /usr/lib/libkdecore.so.4(_Z11kdBacktracev+0x2b) [0x4078bf0b]
2: umbrello(_ZN6UMLApp11setModifiedEb+0x9e) [0x815026e]
3: umbrello(_ZN6UMLDoc11setModifiedEbb+0x45) [0x8161db5]
4: umbrello(_ZN6UMLDoc17removeAssociationEP14UMLAssociation+0x49) [0x815a979]
5: umbrello(_ZN14UMLAssociationD0Ev+0x4f) [0x80dd7cf]
6: /usr/lib/libqt-mt.so.3(_ZN7QObject5eventEP6QEvent+0xac) [0x40bc36fc]
7: /usr/lib/libqt-mt.so.3(_ZN12QApplication14internalNotifyEP7QObjectP6QEvent+0xbf) [0x40b6e57f]
8: /usr/lib/libqt-mt.so.3(_ZN12QApplication6notifyEP7QObjectP6QEvent+0x10b) [0x40b6db8b]
9: /usr/lib/libkdecore.so.4(_ZN12KApplication6notifyEP7QObjectP6QEvent+0xaf) [0x4076ff3f]
10: /usr/lib/libqt-mt.so.3(_ZN12QApplication16sendPostedEventsEP7QObjecti+0x176) [0x40b6f346]
11: /usr/lib/libqt-mt.so.3(_ZN12QApplication16sendPostedEventsEv+0x28) [0x40b6f1c8]
12: /usr/lib/libqt-mt.so.3(_ZN10QEventLoop13processEventsEj+0x7e) [0x40b1dbfe]
13: /usr/lib/libqt-mt.so.3(_ZN10QEventLoop9enterLoopEv+0xdf) [0x40b8039f]
14: /usr/lib/libqt-mt.so.3(_ZN10QEventLoop4execEv+0x24) [0x40b80254]
15: /usr/lib/libqt-mt.so.3(_ZN12QApplication4execEv+0x21) [0x40b6e7c1]
16: umbrello(main+0x18e) [0x8133e4e]
17: /lib/libc.so.6(__libc_start_main+0xc6) [0x41240da6]
18: umbrello(_ZN6QFrame10paintEventEP11QPaintEvent+0x31) [0x80d91c1]
]
Comment 2 Sebastian Stein 2004-02-04 14:02:25 UTC
Subject: Re: [Uml-devel]  New: blank diagram is erroneously marked modified

Oliver Kellogg <okellogg@users.sourceforge.net> [031228 17:33]:
> http://bugs.kde.org/show_bug.cgi?id=71265     
>            Summary: blank diagram is erroneously marked modified
> ...
> Start umbrello and open a diagram file.
> Close the diagram without any modifications.
> Umbrello will still ask "The diagram has been modified. Do
> you wish to save..." This is especially annoying on the blank (default) diagram.

I think the problem is fixed, because the setModified() call is already
commented out. Nevertheless, please check again.

Steinchen
Comment 3 Oliver Kellogg 2004-05-11 20:26:51 UTC
Still happens with cvs of today, 2004/05/11.
Comment 4 Raymond Bosman 2004-05-11 22:43:41 UTC
Created attachment 5955 [details]
set modified patch. 

contentsMouseRelease does a setModified. This should be done at the
toolbarstate-classes. Probably this bug reappeared after the
toolbarstate-patch.
Comment 5 Raymond Bosman 2004-05-12 01:12:30 UTC
Created attachment 5959 [details]
same patch but without the color codes

Sorry, the previous patch contains color-codes generated by a color_cvs script.
Here is the same patch again, but without these markup codes.
Comment 6 Sebastian Stein 2004-05-12 08:54:58 UTC
Raymond Bosman <bosman@hetnet.nl> [040512 08:36]:
> contentsMouseRelease does a setModified. This should be done at the
> toolbarstate-classes.

I think the whole setModified() and Undo/Redo architectur is wrong. At the
moment there are setModified() calls in data classes and in view classes. In
my opinion such calls should only happen in view classes. What do you think
the right solution would be?

Sebastian

Comment 7 Raymond Bosman 2004-05-12 10:54:38 UTC
The setModified() has nothing to do with the internal data (classes).  So I agree that it should only happen in the view classes. 

Speaking about Model-View-Controller: Are all data-classes 'view-code' free? (For example the class: AssociationWidget)
Comment 8 Jonathan Riddell 2004-05-28 01:49:52 UTC
Thanks for your patch, it's in CVS.

See question 3 at http://uml.sourceforge.net/faq.php
for the best way to make a patch (i.e. "cvs diff").

Umbrello's classes are in many parts suffering from bitrot, the model-view-controller idea is probably not followed in various places (all more patches happily received :)