MantisBT - VTK
View Issue Details
0012644VTK(No Category)public2011-10-11 18:212013-06-05 18:10
Xiaofeng Z 
Jean-Christophe Fillion-Robin 
normalminorhave not tried
closedno change required 
5.8.0 
 
TBD
incorrect functionality
0012644: Unable to display "%" as the last character in tooltip using "SetTooltipLabelFormat"
e.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(...)
No tags attached.
Issue History
2011-10-11 18:21Xiaofeng ZNew Issue
2011-10-11 18:26Xiaofeng ZNote Added: 0027563
2011-10-11 19:01David ColeNote Added: 0027564
2013-06-05 18:09Jean-Christophe Fillion-RobinAssigned To => Jean-Christophe Fillion-Robin
2013-06-05 18:09Jean-Christophe Fillion-RobinStatusbacklog => tabled
2013-06-05 18:10Jean-Christophe Fillion-RobinNote Added: 0030959
2013-06-05 18:10Jean-Christophe Fillion-RobinStatustabled => closed
2013-06-05 18:10Jean-Christophe Fillion-RobinResolutionopen => no change required
2013-06-05 18:10Jean-Christophe Fillion-RobinNote Edited: 0030959bug_revision_view_page.php?bugnote_id=30959#r616

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

plot->SetTooltipLabelFormat("%l: %x, %y%\n");
 
seemed to work.
(0027564)
David Cole   
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   
2013-06-05 18:10   
Closing issue. Solution reported in note http://www.vtk.org/Bug/view.php?id=12644#c27564 [^]