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] [GridCtrl] Copy on GridCtrl with no selection will crash a program.
[BUG & FIX] [GridCtrl] Copy on GridCtrl with no selection will crash a program. [message #41379] Mon, 09 December 2013 01:59
Lance is currently offline  Lance
Messages: 526
Registered: March 2007
Contributor
Symptom: If you call the Copy method of a GridCtrl while no cell/row is selected, your program will crash because of an assertion failure.

Fix:
Make the following change to SetClipboard in GridCtrl.cpp
void GridCtrl::SetClipboard(bool all, bool silent)
{
// skipped many lines

// change this line
	bool row_selected = select_row && IsSelected(curpos.y, false);
// to
	bool row_selected = select_row && curpos.y=>0 && IsSelected(curpos.y, false);

[Updated on: Mon, 09 December 2013 04:56]

Report message to a moderator

Previous Topic: GridCtrl and ThreeState option
Next Topic: AddColumn(0, ...) crashes
Goto Forum:
  


Current Time: Fri Mar 29 00:36:18 CET 2024

Total time taken to generate the page: 0.01470 seconds