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 & FIX] in HeaderCtrl::LeftDouble
[BUG & FIX] in HeaderCtrl::LeftDouble [message #43184] Fri, 30 May 2014 10:30 Go to next message
qapko is currently offline  qapko
Messages: 55
Registered: October 2007
Location: Slovakia
Member
Hello.

I have upgraded my installation of Ultimate++ from version 3211 to 7403 (yes, I was really using it for 3 years!). While testing my application with the new version I incidentally found a bug in method HeaderCtrl::LeftDouble causing my application to crash after double-clicking at the "right place" of HeaderCtrl. I think the problem is that in the method the value returned by GetSplit is not tested by IsNull. I'm not using the functionality at all, so my fix is some kind of blind:

void HeaderCtrl::LeftDouble(Point p, dword keyflags)
{
	int q = GetSplit(p.x);
	if(q >= 0 || IsNull(q))
		return;
	q = -1 - q;
	col[q].WhenLeftDouble();
}

Is the code OK? And aren't there some other places with the same problem?

Have a nice day and thank you for the Ultimate++ Smile

Gabi

[Updated on: Fri, 30 May 2014 10:31]

Report message to a moderator

Re: [BUG & FIX] in HeaderCtrl::LeftDouble [message #43242 is a reply to message #43184] Fri, 13 June 2014 10:43 Go to previous messageGo to next message
qapko is currently offline  qapko
Messages: 55
Registered: October 2007
Location: Slovakia
Member
Hello.

Please, can somebody look at the fix and eventually apply the changes to the Ultimate++ sources? The problem appears when I have HeaderCtrl in "absolute" mode and double-click at the HeaderCtrl at the empty place right of the last showed column. I'm sorry that in my last post it wasn't explained clearly. In fact I thought it would be obvious to anybody knowing what GetSplit does. But nor I am the one... Smile

Thank you.

Gabi
Re: [BUG & FIX] in HeaderCtrl::LeftDouble [message #43305 is a reply to message #43184] Fri, 27 June 2014 09:43 Go to previous messageGo to next message
qapko is currently offline  qapko
Messages: 55
Registered: October 2007
Location: Slovakia
Member
OK. So here is the testcase Wink

It is a code from Upp/reference/ArrayCtrl modified to expose the bug (main.cpp, line 47).
After starting the application just try to double-click on the header of the array at the empty space right after the last column. The place is marked with the red arrow here:

index.php?t=getfile&id=4574&private=0

Please, can the fix be applied to the official Ultimate++ sources?

Thank you and have a nice day Smile

Gabi

[Updated on: Fri, 27 June 2014 09:50]

Report message to a moderator

Re: [BUG & FIX] in HeaderCtrl::LeftDouble [message #43382 is a reply to message #43305] Wed, 16 July 2014 08:35 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
What a shame missing this for so long. I apologize, thanks for the testcase, it is fixed now.

And you did a right thing to send a private message, next time do it again, please.

Mirek
Previous Topic: GridCtrl: custom ButtonOption inside a cell
Next Topic: [bug?] Can't Convert::Scan rows in ArrayCtrl
Goto Forum:
  


Current Time: Fri Apr 19 12:46:27 CEST 2024

Total time taken to generate the page: 0.08110 seconds