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 » ArrayCtrl, HeaderCtrl & GridCtrl » [bug] ArrayCtrl removing all rows upon removing only last row
Re: [bug] ArrayCtrl removing all rows upon removing only last row [message #40430 is a reply to message #40393] Thu, 01 August 2013 09:12 Go to previous messageGo to previous message
koldo is currently offline  koldo
Messages: 3443
Registered: August 2008
Senior Veteran
Hello kropniczki

Without testing your code I suspect RemoveSelection() may call in any way WhenAction so RemoveArrSel() is recursively called until array is empty.

Maybe the simplest way to avoid this is to avoid recursion in RemoveArrSel(), like:

void RemoveArrSel() {  
	static bool inFunction;
	if (inFunction)
		return;
	inFunction = true;
	array.RemoveSelection();
	inFunction = false;
}

Although for sure there will be something smarter Smile.


Best regards
IƱaki
 
Read Message
Read Message
Read Message
Previous Topic: Hand cursor over ArrayCtrl Column
Next Topic: [SMALL BUG] HeaderCtrl - one pixel width white line - artifact
Goto Forum:
  


Current Time: Sun Aug 17 23:21:24 CEST 2025

Total time taken to generate the page: 0.04980 seconds