Home » U++ Library support » LineEdit, EditFields, DocEdit » BUG: LineEdit "Drag And Drop" violates read-only state
BUG: LineEdit "Drag And Drop" violates read-only state [message #38768] |
Wed, 16 January 2013 08:00 |
navi
Messages: 107 Registered: February 2012 Location: Sydney, Australia
|
Experienced Member |
|
|
Hi All,
If you add 2 LineEdit ctrl in your window and 1 of them is read-only. if text drag from read-only LineEdit to a non read-only LineEdit ctrl text are moved from read-only ctrl to other ctrl. Essentially violating the read-only state of the read-only ctrl.
I have investigated the DragAndDrop(Point p, PasteClip& d) function of the LineEdit ctrl in LineEdit.cpp Line:777. And found that the writer of the function put a safeguard for such an issue in the first line. see follwoing:
LineEdit.cpp Line:777
void LineEdit::DragAndDrop(Point p, PasteClip& d)
{
//My FIX::
//if(IsReadOnly() || GetDragAndDropSource()->IsReadOnly()) return;
if(IsReadOnly()) return;
...
}
however in reality in "dragging & dropping" action, half the action triggers execution of the DND function of the source ctrl. and other half the triggers execution of the DND function of target ctrl. Since target ctrl is not read-only, the function executes and the text is moved from read-only ctrl to a non read-only ctrl.
attached project is elaborate test example & fix example.
[Updated on: Wed, 16 January 2013 08:01] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Fri Nov 01 00:20:49 CET 2024
Total time taken to generate the page: 0.02101 seconds
|