Inherited unmodified styles not saved

Please post all new bug reports for Help & Manual 5 here.
Post Reply
peter.macej
Posts: 32
Joined: Fri Jun 13, 2008 1:58 pm
Location: Slovakia
Contact:

Inherited unmodified styles not saved

Unread post by peter.macej »

When I create my custom paragraph style based on existing style, without doing any modifications to it, this new style is lost after restarting H&M.

To reproduce:
  • Open Edit Styles window and add new style as a child of Normal style.
  • This new style is named Normal2 by default. Don't do anything and just press OK.
  • Now you can use Normal2 style in your text and everything works as expected.
  • Close and open H&M. Now you can see that Normal2 doesn't exist and the paragraphs with Normal2 style show style name with red color.
The problem doesn't occur if you change something in new Normal2 style, e.g. font size. But I need several styles with the same formatting.
Peter Macej
Helixoft, VSdocman - code documentor
User avatar
John Waller
Posts: 827
Joined: Thu Apr 20, 2006 9:34 pm
Location: Adelaide, South Australia

Unread post by John Waller »

Which version of HM and which build, Peter?
Regards

John Waller
v.6.2.2 Build 2636
peter.macej
Posts: 32
Joined: Fri Jun 13, 2008 1:58 pm
Location: Slovakia
Contact:

Unread post by peter.macej »

Professional Edition, version 5.0.1, build 525

Just small suggestion, the version number could be selectable text in About window so one could copy and paste it :)
Peter Macej
Helixoft, VSdocman - code documentor
User avatar
Martin Wynne
Posts: 2656
Joined: Mon May 12, 2003 3:21 pm
Location: West of the Severn, UK

Re: Inherited unmodified styles not saved

Unread post by Martin Wynne »

peter.macej wrote:
  • Open Edit Styles window and add new style as a child of Normal style.
  • This new style is named Normal2 by default. Don't do anything and just press OK.
  • Now you can use Normal2 style in your text and everything works as expected.
  • Close and open H&M. Now you can see that Normal2 doesn't exist and the paragraphs with Normal2 style show style name with red color.
The problem doesn't occur if you change something in new Normal2 style, e.g. font size. But I need several styles with the same formatting.
Hi Peter,

When you create the new style, change the Based on Style: box to (none). The new style will then be saved.

You can't save a style based on some other style if there are no changes between them, because there is then nothing to save. I think the bug here is in H&M letting you create an empty inherited style in the first place.

Suggestion: I think it would be better to have radio buttons for selecting between Inherited Style or Not Inherited. Then the combo box can be enabled if the Inherited Style option is selected.

regards,

Martin.
peter.macej
Posts: 32
Joined: Fri Jun 13, 2008 1:58 pm
Location: Slovakia
Contact:

Re: Inherited unmodified styles not saved

Unread post by peter.macej »

Martin Wynne wrote:When you create the new style, change the Based on Style: box to (none).
The problem is that I need this new style be inherited. I have the style tree like:
Normal
--Table text
----Table header
------Table header VB
------Table header Csharp
------Table header Cpp
etc.

The Table header VB style and the following ones should inherit formatting from Table header style. I'm using them just for finer identification. This way I can find all tables with e.g. Table header VB and hide them in HTML using Javascript.

I think it is OK to allow defining unmodified styles. For example, I can create skeleton of my style hierarchy and then modify the styles only when I first need them. Or I can do such "magic" describred above :)
Peter Macej
Helixoft, VSdocman - code documentor
User avatar
Martin Wynne
Posts: 2656
Joined: Mon May 12, 2003 3:21 pm
Location: West of the Severn, UK

Re: Inherited unmodified styles not saved

Unread post by Martin Wynne »

peter.macej wrote:I think it is OK to allow defining unmodified styles. For example, I can create skeleton of my style hierarchy and then modify the styles only when I first need them.
Hi Peter,

I can see the usefulness, but I suspect the save mechanism can't handle an empty style.

The workaround would be to change something which doesn't affect anything visible. For example you could probably change the text or para background colour from transparent to white. Or change the font colour by an invisible amount -- a change of just 1 in an rgb setting should be enough.

regards,

Martin.
peter.macej
Posts: 32
Joined: Fri Jun 13, 2008 1:58 pm
Location: Slovakia
Contact:

Re: Inherited unmodified styles not saved

Unread post by peter.macej »

Martin Wynne wrote:The workaround would be to change something which doesn't affect anything visible.
Thanks. I was thinking of something similar. I have changed paragraph border color. Since the border is set to None, this has no visual effect. But I still think it is the bug that the styles you are working whole day with, are not there the other day.
Peter Macej
Helixoft, VSdocman - code documentor
User avatar
Tim Green
Site Admin
Posts: 23189
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Unread post by Tim Green »

This is definitely a bug and will be fixed. You should be able to save as many styles as you like with whatever attributes you like, even if they are identical. 8)
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
peter.macej
Posts: 32
Joined: Fri Jun 13, 2008 1:58 pm
Location: Slovakia
Contact:

Unread post by peter.macej »

Hi again. I think I've just found another symptom of the same issue. This one doesn't persist the Same Options as Screen View setting for Print Manual View tab of the style.

To reproduce, create inherited style List from Normal. For Screen View set its left paragraph indent to 13px. Uncheck Same Options as Screen View for Print Manual View and set left paragraph indent to 0px.

Now create inherited style Numbered List from List. For Screen View set its left paragraph indent to 24px. Uncheck Same Options as Screen View for Print Manual View and set left paragraph indent to 0px.

That's all. Close and reopen Edit styles window. You should see the following styles:
Normal
--List
----Numbered List
When you look at Numbered List, there should be Same Options as Screen View unchecked with left paragraph indent set to 0px. Instead it is checked and the indent is 24px - as in Screen view.
Peter Macej
Helixoft, VSdocman - code documentor
User avatar
Tim Green
Site Admin
Posts: 23189
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Unread post by Tim Green »

Hi Peter,

Confirmed, thanks for the detailed description. I've passed this directly on to the developers.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Tim Green
Site Admin
Posts: 23189
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Unread post by Tim Green »

Peter,

Update: The background of this is that it is a logic problem, based on the fact that a value of "0" is interpreted as "default". If all the settings have any value other than 0 they will be retained, and if you have values of 0 and 0 for screen and 12 and 24 for print it will also work, because you are assigning something "other than default" to the print styles. A fix is in the works.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Post Reply