View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0012644VTK(No Category)public2011-10-11 18:212013-06-05 18:10
ReporterXiaofeng Z 
Assigned ToJean-Christophe Fillion-Robin 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionno change required 
PlatformOSOS Version
Product Version5.8.0 
Target VersionFixed in Version 
Summary0012644: Unable to display "%" as the last character in tooltip using "SetTooltipLabelFormat"
Descriptione.g.:

plot->SetTooltipLabelFormat("%l: %x, %y%")

In the above case, the % character at the end of the format string is not displayed as when it is readed, it is considered escape char. On the other hand, since this is the last char, it didn't get a chance to be added back to the output string.

Proposed fix:

Add

  if (escapeNext)
    tooltipLabel += "%"

before

  return tooltipLabel;

inside vtkPlot::GetTooltipLabel(...)
TagsNo tags attached.
ProjectTBD
Typeincorrect functionality
Attached Files

 Relationships

  Notes
(0027563)
Xiaofeng Z (reporter)
2011-10-11 18:26

Workaround:

plot->SetTooltipLabelFormat("%l: %x, %y%\n");
 
seemed to work.
(0027564)
David Cole (developer)
2011-10-11 19:01

Use %% when you want to display a single % character in the output. Just like any other printf style function... That's not a work-around... That's the way it works!
(0030959)
Jean-Christophe Fillion-Robin (manager)
2013-06-05 18:10
edited on: 2013-06-05 18:10

Closing issue. Solution reported in note http://www.vtk.org/Bug/view.php?id=12644#c27564 [^]


 Issue History
Date Modified Username Field Change
2011-10-11 18:21 Xiaofeng Z New Issue
2011-10-11 18:26 Xiaofeng Z Note Added: 0027563
2011-10-11 19:01 David Cole Note Added: 0027564
2013-06-05 18:09 Jean-Christophe Fillion-Robin Assigned To => Jean-Christophe Fillion-Robin
2013-06-05 18:09 Jean-Christophe Fillion-Robin Status backlog => tabled
2013-06-05 18:10 Jean-Christophe Fillion-Robin Note Added: 0030959
2013-06-05 18:10 Jean-Christophe Fillion-Robin Status tabled => closed
2013-06-05 18:10 Jean-Christophe Fillion-Robin Resolution open => no change required
2013-06-05 18:10 Jean-Christophe Fillion-Robin Note Edited: 0030959


Copyright © 2000 - 2018 MantisBT Team