Bug #5564

Text style editing dialog forcefully sets font when it is not previously defined

Added by Tuukka Lehtonen over 2 years ago. Updated over 2 years ago.

Status:ClosedStart date:2014-12-31
Priority:4Due date:2015-01-16
Assignee:Tuukka Lehtonen% Done:

100%

Category:DiagramSpent time:-
Target version:1.18.1
Release notes:Edit Style dialog no longer forcefully sets a font when -- keep current font -- is selected from the font list
Tags: diagram
Story points-
Velocity based estimate-
ReleaseSimantics 1.18.1Release relationshipAuto

Description

If a generic text element does not define a G2D.HasFont property at all, the diagram text element implementation defaults to using (Arial, Plain, 12) font.

However, if the user tries to edit the style of such a text element, the style editing dialog forces the user to select a font from the font list even if the user only wanted to set the text color.

Two simple solutions come to mind:
  1. If font is not defined, default to the same (Arial, Plain, 12). The problem with this is that it is just a default that could change thus potentially breaking the dialog again in the future.
  2. Add an option -- keep current font-- as the first entry of the font list. This will work in both cases: when font is defined and when it is not. If not defined, the dialog will simply not set the font upon OK.

Decided to go with option 2.

At the same time, I'm removing the font setting from the dialog's font list because it makes the list less readable and for some fonts, the name is barely readable at all.

Associated revisions

Revision 30743
Added by Tuukka Lehtonen over 2 years ago

Changed EditStyleHandler to not set a font unless the user actually selects it in the case where no specific font is specified in the edited text element.

refs #5564

History

#1 Updated by Tuukka Lehtonen over 2 years ago

  • Tags set to diagram
  • Description updated (diff)
  • Release set to 17

#2 Updated by Tuukka Lehtonen over 2 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100
  • Release notes set to Edit Style dialog no longer forcefully sets a font when -- keep current font -- is selected from the font list

Also available in: Atom PDF