Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » TabCtrl » TabCtrl FIX
TabCtrl FIX [message #23496] Fri, 23 October 2009 18:39
Didier is currently offline  Didier
Messages: 681
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: Thu Jun 20 01:26:21 CEST 2024

Total time taken to generate the page: 0.02518 seconds