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
Messages: 549 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
|
|
|
Goto Forum:
Current Time: Fri Sep 20 04:03:31 CEST 2024
Total time taken to generate the page: 0.06205 seconds
|