Problem with default white shapes' background color
Hi team!
The first case is about default shapes creation:
- Create a rectangle from "General" in the left menu (Note! The rectangle's background color is a DEFAULT WHITE);
- Optional step. Click "Set as Default style" for the rectangle (it shows that even you specified "Default style", you get this issue);
- Change the rectangle's "Fill" to another color (Let's take RED);
- Create the second rectangle from "General" in the left menu;
ER: The second rectangle is created with a DEFAULT WHITE fill color. AR: The second rectangle is created with RED color from 3rd step, although it is not specified as Default Style's "Fill" color.
The second and most annoying case is met when you create some shape from Scratchpad:
- Create a rectangle from "General" in the left menu (Note! The rectangle's background color is DEFAULT WHITE);
- Save the rectangle to Scratchpad by Drag'n'Drop;
- Close the tab with diagrams.net. Doesn't matter whether you save this document or not;
- Open a new tab with diagrams.net;
- Create a rectangle from "General" in the left menu;
- Change the rectangle's "Fill" to another color (Let's take RED);
- Create the rectangle from Scratchpad.
ER: I want to get what I have saved as if I did copy-paste action. Instead of that, I get shapes with reset properties. AR: I get shapes with background overwritten either by "Save as Default style" action or a manually set background color for absolutely another shape.
Hint: I have checked a lot of different scenarios and I am almost sure that the problem is connected with a DEFAULT WHITE color. I mean the color shapes are created by default. The same white color is placed in the "Style" panel in the first place. And seems it is also connected with manually setting of "Fill" in shapes.
Good luck, team!)))
This is intended behavior.
Default style is the combination of styles you used. It is automatically updated on user action. If you want to explicitly set it, select a shape and click Set as Default Style, or click Clear Default Style to reset it. This was done so when set a specific style all new shapes you drop will use that style (until you change the default style).
For shapes in the sidebar if a style isn't set, it will use the default style. So in your case you should probably set the fill of your shape to explicit white and then the default fill style will not be applied.
I hope this helped.