MantisBT - VCMI
View Issue Details
0001977VCMIGUI - PreGamepublic2014-11-24 11:252014-12-22 09:45
SXX 
SXX 
normalminoralways
closedfixed 
0.97 
0.97b 
0001977: CTextBox::setText don't reset label width before check if slider needed
I'm create this issue mainly because I'm fixed it and need explain reason behind code change I'll pull soon. This problem can be easily reproduced on map select / save load screens.

So short bug explanation: when slider is active and you're changing text on label via setText it's check number of lines used to decide if slider have to remain or being removed, but before this check it's don't reset label size to default.

As result even if text will fit without slider it's will remain visible because when slider active it's not fit into available lines.
  - Go to "New Game" -> "Single scenario" -> click on "Show Available scenarios"
  - Choose "Map A" with long description that need slider.
  - Choose "Map B" with description that almost fit description label, but with slider it's not.
  - You'll see it's still have slider active.
  - Choose "Map C" with really short description so slider disabled
  - Now choose "Map B" again and you'll see slider is not used.
No tags attached.
png bug_map_description_slider_1.png (574,496) 2014-11-24 11:25
https://bugs.vcmi.eu/file_download.php?file_id=2016&type=bug
png

png bug_map_description_slider_2.png (574,450) 2014-11-24 11:25
https://bugs.vcmi.eu/file_download.php?file_id=2017&type=bug
png

png bug_map_description_slider_3.png (567,837) 2014-11-24 11:26
https://bugs.vcmi.eu/file_download.php?file_id=2018&type=bug
png

png bug_map_description_slider_4.png (572,551) 2014-11-24 11:26
https://bugs.vcmi.eu/file_download.php?file_id=2019&type=bug
png
Issue History
2014-11-24 11:25SXXNew Issue
2014-11-24 11:25SXXStatusnew => assigned
2014-11-24 11:25SXXAssigned To => SXX
2014-11-24 11:25SXXFile Added: bug_map_description_slider_1.png
2014-11-24 11:25SXXFile Added: bug_map_description_slider_2.png
2014-11-24 11:26SXXFile Added: bug_map_description_slider_3.png
2014-11-24 11:26SXXFile Added: bug_map_description_slider_4.png
2014-11-24 13:42SXXNote Added: 0005159
2014-12-03 00:07SXXStatusassigned => resolved
2014-12-03 00:07SXXFixed in Version => 0.97b
2014-12-03 00:07SXXResolutionopen => fixed
2014-12-22 09:45SXXStatusresolved => closed

Notes
(0005159)
SXX   
2014-11-24 13:42   
Pull request with fix:
https://github.com/vcmi/vcmi/pull/61 [^]