After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 526284 - Change properties on multiselection not work
Change properties on multiselection not work
Status: RESOLVED DUPLICATE of bug 60331
Product: dia
Classification: Other
Component: general
CVS head
Other All
: Normal minor
: ---
Assigned To: Dia maintainers
Dia maintainers
Depends on:
Blocks:
 
 
Reported: 2008-04-05 07:06 UTC by Pawel Prokop
Modified: 2008-04-08 06:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (3.50 KB, patch)
2008-04-06 10:16 UTC, Pawel Prokop
needs-work Details | Review

Description Pawel Prokop 2008-04-05 07:06:30 UTC
Please describe the problem:
When multiple objects of the same type are selected on the diagram, modification of object's properties applies only on the last selected object.

Steps to reproduce:
1. Create line object 
2. Create line object  again
3. Select first and second line (SHIFT+click object on diagram)
4. Press Alt-Enter to change properties
5. Change arrows type

Actual results:
Modification is applied on the last selected element.

Expected results:
Modification on all selected elements.

Does this happen every time?
Yes

Other information:
Comment 1 Pawel Prokop 2008-04-06 10:16:29 UTC
Created attachment 108710 [details] [review]
patch

This patch fixes problem with modification of properties for multiple selected objects.
Comment 2 Hans Breuer 2008-04-06 16:44:53 UTC
I've tried your patch with a small UML diagram but it does not work as advertised. Unfortunately the 'UML - Class' object is rather complex and can not  apply_properties_from_dialog() without having access to the object specific dialog.
The short-cut you added (prop_dialog == NULL) leads to no object properties being applied. (I have tested to change some colors).
Looking at the 'UML - Class' as an example I don't see how the simplistic approach can ever work for complex objects. A lot of stuff in the dialog is object specific (e.g. the number of attributes/operations). As a result it will possibly be different for every class in the selection.

The problem you are trying to solve is similar to the "properties of grouped object" quest (see bug #60331 for the details). I think there are only relatively small changes missing to actually make it work for an un-grouped selection.

*** This bug has been marked as a duplicate of 60331 ***
Comment 3 Pawel Prokop 2008-04-08 06:16:40 UTC
Yes, right. I didn't know trick with grouping elements to change properties before. And yes, my solution work only for simple objects, not complex.
I addend prop_dialog == NULL check because pointer has been used without it's check and provided SEGV on apply properties for complex objects.

Modification of complex objects seems to be more complicated. See scenario:
1. select UML - Class object.
2. click properties (properties dialog for this object is shown)
3. add another object to selection

What should happen with dialog? 
Should it be reloaded at this moment and display only common properties for selected objects (in example: colors)?