U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » TabCtrl » TabCtrl FIX
TabCtrl FIX [message #23496] Fri, 23 October 2009 18:39
Didier is currently offline  Didier
Messages: 740
Registered: November 2008
Location: France
Contributor
Hello,

I posted a message in the wrong topic, sorry Embarassed :
http://www.ultimatepp.org/forum/index.php?t=msg&th=4709& amp;start=0&


Anyway I found a bug to TabCtrl and here's the correction:

In TabCtrl.cpp Line 139

replace
ScrollInto(sel);

with
if (sel < tab.GetCount())	ScrollInto(sel);



Without this, TabCtrl crashes in Debug mode due to an assert when you use remove() method.


If the currently selected tab is the last tab, then when you remove -any- tab ==> crash.

This is a 'anti crash' correction, maybe there is something better to do by updating 'sel' before calling ScrollInto().
On the contrary, when the removed tab is the last one, the problem will come back again

Previous Topic: TabDlg propose
Next Topic: TabCtrl crash in debug mode when using remove method
Goto Forum:
  


Current Time: Wed May 06 11:07:42 GMT+2 2026

Total time taken to generate the page: 0.00916 seconds