Book a Demo

Author Topic: Reset appearance to defaults  (Read 17037 times)

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1183
  • Karma: +30/-8
    • View Profile
Reset appearance to defaults
« on: April 20, 2015, 10:07:03 pm »
On a diagram, I had changed the format of a a class and gave a grey background. Later on I gave the class a stereotype of enumeration, I was expecting the format to change to the default enumeration format, green but did not. So I right clicked on it selected Default Appearance/Reset to Defaults/OK, the format still did not change. To get the default format I had to click on the eye drop to copy the format of another class in the diagram that did not have an enumeration stereotype and apply the format to the class with the enumeration stereotype and a custom format.

Is this a bug? Is it supposed to work that way?

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Reset appearance to defaults
« Reply #1 on: April 21, 2015, 08:39:45 am »
An enumeration is not a class with the «enumeration» stereotype, it is its own metaclass. To change a class to an enumeration, Main Menu > Element > Advanced > Change Type.

Oh, and regarding how the colours work: 1. Create a class, it is the default colour for a class, i.e. white. 2. Press F4 and set it to grey. 3. Convert it to an enumeration, it is still grey. 4. Press F4 and set it to default fill colour, it is now the default colour for an enumeration, i.e. green.
« Last Edit: April 21, 2015, 08:43:06 am by KP »
The Sparx Team
[email protected]

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1183
  • Karma: +30/-8
    • View Profile
Re: Reset appearance to defaults
« Reply #2 on: April 21, 2015, 05:46:46 pm »
Quote
An enumeration is not a class with the «enumeration» stereotype, it is its own metaclass. To change a class to an enumeration, Main Menu > Element > Advanced > Change Type.

Oh, and regarding how the colours work: 1. Create a class, it is the default colour for a class, i.e. white. 2. Press F4 and set it to grey. 3. Convert it to an enumeration, it is still grey. 4. Press F4 and set it to default fill colour, it is now the default colour for an enumeration, i.e. green.
I think you have paid too much attention to the <<enumeration>> stereotype and too little attention to the real problem.

F4 | Reset to Defaults | OK does not work, at least not for me. There multiple variations on how to reproduce this but it does not change the color. The dialog shows the right color after a click on Reset Defaults but Ok does nothing, the class does not change color and it does not matter if it has an stereotype or not.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Reset appearance to defaults
« Reply #3 on: April 21, 2015, 06:52:07 pm »
Which version of EA are you using?

q.

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1183
  • Karma: +30/-8
    • View Profile
Re: Reset appearance to defaults
« Reply #4 on: April 21, 2015, 07:07:14 pm »
Quote
Which version of EA are you using?

q.
EA 12 Professional Build 1212 which was the latest build available when I went to download Build 1211.

Steps to reproduce (one of many):

1) Create a diagram
2) Add a class in the diagram (no stereotypes)
3) Use the diagram tool bar to change its fill color to something other than white (pick your favourite color)
4) Press F4
5) Click on Reset to Defaults, box on the right changes to default color
6) Press Ok, nothing happens, the class remains with a fill of your favorite color

Now try something else
1) Add another class to the diagram
2) Press F4
3) Change the fill color to you favorite color
5) Click Ok, the fill color changes (as expected)
6) Press F4 again
7) Click Reset to Defaults, color in right box changes to default
8) Click Ok
9) Fill color changes to default

This is a bug in my book.

Although, somehow, I am expecting somebody to give me an explanation about the differences between changing color through the toolbar and through F4.


qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Reset appearance to defaults
« Reply #5 on: April 21, 2015, 08:10:51 pm »
The diagram toolbar sets only the diagram local appearance while F4 accesses the global settings. They are different!

If you change an element via F4 and drag that subsequently to other diagrams (or if you have them already there) the color will change globally.
- Take your F4-modified class and drag it as link to other diagrams. It will have the different color.
- Drag the diagram-tool changed class to other diagrams: it will have the default color.

You override the global settings in any single diagram individually via the diagram toolbar.

q.
« Last Edit: April 21, 2015, 08:15:32 pm by qwerty »

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1183
  • Karma: +30/-8
    • View Profile
Re: Reset appearance to defaults
« Reply #6 on: April 21, 2015, 08:16:25 pm »
Quote
The diagram toolbar sets only the diagram local appearance while F4 accesses the global settings. They are different!

If you change an element via F4 and drag that subsequently to other diagram (or if you have them already there) the color will change globally.

You override the global settings in any single diagram individually via the diagram toolbar.

q.
Are you saying that by design you cannot change local settings by using a global settings dialog? Just a yes or no please.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Reset appearance to defaults
« Reply #7 on: April 22, 2015, 04:13:43 am »
Yes.

q.

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1183
  • Karma: +30/-8
    • View Profile
Re: Reset appearance to defaults
« Reply #8 on: April 22, 2015, 05:50:29 pm »
Quote
Yes.

q.
You know what I am going to ask next. Why? What is the rationale behind not allowing by design to change local settings by using a global settings dialog?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Reset appearance to defaults
« Reply #9 on: April 22, 2015, 08:09:13 pm »
I would have explained, but you asked for yes/no.

The rational is simple. The global F4 is what it says: global. If you change an element that way it will change it in all diagrams and whenever you re-use it on any diagram. The diagram painter supersedes the setting locally for that single diagram - and only for this one. To me that makes pretty much sense. Though I also had a bad time understanding the mechanism the first time.

q.

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1183
  • Karma: +30/-8
    • View Profile
Re: Reset appearance to defaults
« Reply #10 on: April 22, 2015, 08:32:05 pm »
Quote
I would have explained, but you asked for yes/no.
One step at a time, it is too easy to give an explanation that does not answer a simple question. Fortunately you do not do that often.

Quote
If you change an element that way it will change it in all diagrams and whenever you re-use it on any diagram. The diagram painter supersedes the setting locally for that single diagram - and only for this one. To me that makes pretty much sense. Though I also had a bad time understanding the mechanism the first time.
I have no problem with the behaviour you describe, it does make sense, and is useful. My only problem is the amount of keys I need to press and the amount of mouse clicks needed to reset an element on a diagram to defaults. It will be nice to do it in 2 clicks, one to reset an element on diagram and one to confirm.

Does this sound unreasonable?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Reset appearance to defaults
« Reply #11 on: April 22, 2015, 09:16:15 pm »
Yes and no. The problem (like for many things in EA) is that the one does not know about the other. "Reset to default" - so to which one? The global? The "very basic one" ? If there were one painter that had both in it (knowledge about the diagram and the global settings) it would be feasible. But that's not the awkward EA way. So your chances are low to see that fixed. Those guys still chop the few Australian trees...

q.