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 327701 - Text colour unsaved
Text colour unsaved
Status: RESOLVED FIXED
Product: dia
Classification: Other
Component: objects
0.94
Other Windows
: Normal normal
: 0.95
Assigned To: Dia maintainers
Dia maintainers
Depends on:
Blocks:
 
 
Reported: 2006-01-19 13:33 UTC by delvento
Modified: 2006-01-27 23:18 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description delvento 2006-01-19 13:33:17 UTC
The UML-Message has two colors: text_colour and line_colour, but only the latter is saved (and reloaded), the latter is always black on reloaded files, whereas text_colour can be successfully changed runtime. 
Trying to add a text_colour tag manually in the (uncompressed) file has no effect.
Comment 1 Hans Breuer 2006-01-21 13:58:50 UTC
Cant reproduce with current cvs nor with 0.94. Looking at the change
http://cvs.gnome.org/viewcvs/dia/objects/UML/message.c?r1=1.45&r2=1.46
this in fact was available with 0.94.
Are you really using or are you doing something completely different?
Comment 2 delvento 2006-01-23 14:28:28 UTC
I am really using it. Try to reproduce the bug this way: have a look at the following uncompressed dia file (usually I work on linux, but I encounter the bug in these days, when I have not my PC and I am running Dia on someone else machine with winXP).

When I load the file, I saw the "try to color me..." text in black. I can change the color and it does work, but if I save, close Dia, reopen Dia and reload the file it becomes black againg!

In fact you can read that there is no "text colour" attribute in the saved XML.
Bye,
;Davide

<?xml version="1.0" encoding="UTF-8"?>
<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/">
  <dia:diagramdata>
    <dia:attribute name="background">
      <dia:color val="#ffffff"/>
    </dia:attribute>
    <dia:attribute name="pagebreak">
      <dia:color val="#000099"/>
    </dia:attribute>
    <dia:attribute name="paper">
      <dia:composite type="paper">
        <dia:attribute name="name">
          <dia:string>#A4#</dia:string>
        </dia:attribute>
        <dia:attribute name="tmargin">
          <dia:real val="2.8222000598907471"/>
        </dia:attribute>
        <dia:attribute name="bmargin">
          <dia:real val="2.8222000598907471"/>
        </dia:attribute>
        <dia:attribute name="lmargin">
          <dia:real val="2.8222000598907471"/>
        </dia:attribute>
        <dia:attribute name="rmargin">
          <dia:real val="2.8222000598907471"/>
        </dia:attribute>
        <dia:attribute name="is_portrait">
          <dia:boolean val="true"/>
        </dia:attribute>
        <dia:attribute name="scaling">
          <dia:real val="1"/>
        </dia:attribute>
        <dia:attribute name="fitto">
          <dia:boolean val="false"/>
        </dia:attribute>
      </dia:composite>
    </dia:attribute>
    <dia:attribute name="grid">
      <dia:composite type="grid">
        <dia:attribute name="width_x">
          <dia:real val="1"/>
        </dia:attribute>
        <dia:attribute name="width_y">
          <dia:real val="1"/>
        </dia:attribute>
        <dia:attribute name="visible_x">
          <dia:int val="1"/>
        </dia:attribute>
        <dia:attribute name="visible_y">
          <dia:int val="1"/>
        </dia:attribute>
        <dia:composite type="color"/>
      </dia:composite>
    </dia:attribute>
    <dia:attribute name="color">
      <dia:color val="#d8e5e5"/>
    </dia:attribute>
    <dia:attribute name="guides">
      <dia:composite type="guides">
        <dia:attribute name="hguides"/>
        <dia:attribute name="vguides"/>
      </dia:composite>
    </dia:attribute>
  </dia:diagramdata>
  <dia:layer name="Background" visible="true">
    <dia:object type="UML - Message" version="0" id="O0">
      <dia:attribute name="obj_pos">
        <dia:point val="4.55,6.6"/>
      </dia:attribute>
      <dia:attribute name="obj_bb">
        <dia:rectangle val="4.4998,5.05;17.1516,7.0502"/>
      </dia:attribute>
      <dia:attribute name="conn_endpoints">
        <dia:point val="4.55,6.6"/>
        <dia:point val="17.1,6.65"/>
      </dia:attribute>
      <dia:attribute name="line_colour">
        <dia:color val="#0000ff"/>
      </dia:attribute>
      <dia:attribute name="text">
        <dia:string>#try to color me...#</dia:string>
      </dia:attribute>
      <dia:attribute name="type">
        <dia:enum val="0"/>
      </dia:attribute>
      <dia:attribute name="text_pos">
        <dia:point val="11,5.75"/>
      </dia:attribute>
    </dia:object>
  </dia:layer>
</dia:diagram>
Comment 3 Hans Breuer 2006-01-23 20:20:58 UTC
Ok, confirmed. I've been looking at UML - Note.
BTW: I'd prefer if you could use the attach file feature next time.
Comment 4 Hans Breuer 2006-01-27 18:47:35 UTC
This is not only an issue with Message text color but also with a lot
of other objects colors, i.e. with every object using 
PROP_STD_TEXT_COLOUR_* and not also having PROP_TYPE_TEXT which 
handles all the text attributes. About to be fixed ;-)
Comment 5 Hans Breuer 2006-01-27 23:18:39 UTC
2006-01-28  Hans Breuer  <hans@breuer.org>

	* objects/UML/message.c : can't use PROP_STD_TEXT_COLOUR_OPTIONAL 
	cause it has PROP_FLAG_DONT_SAVE. It is designed to fill the 
	TextAttributes - not some subset. Fixes bug #327701
	* objects/UML/implements.c objects/UML/generalization.c
	  objects/UML/constraint.c objects/UML/object.c
	  objects/UML/large_package.c objects/UML/realizes.c : same here.
	* objects/UML/dependency.c : same here. Also draw the "Name" with the
	given color, not only the Stereotype.
	* objects/UML/class.c : same here. But we also need to restore 
	explicit restore "text_color" for the load case.