mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
ArrayCtrl multiselect minor fix, DragAndDrop in Win32 shows the dragged content even if rejecting it
git-svn-id: svn://ultimatepp.org/upp/trunk@881 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
5690bda2e4
commit
2cda5dae3b
2 changed files with 4 additions and 3 deletions
|
|
@ -264,7 +264,7 @@ struct UEnumFORMATETC : public IEnumFORMATETC {
|
|||
|
||||
struct UDropSource : public IDropSource {
|
||||
ULONG rc;
|
||||
Image move, copy;
|
||||
Image no, move, copy;
|
||||
|
||||
STDMETHOD(QueryInterface)(REFIID riid, void ** ppvObj);
|
||||
STDMETHOD_(ULONG, AddRef)(void) { return ++rc; }
|
||||
|
|
@ -455,7 +455,7 @@ STDMETHODIMP UDropSource::GiveFeedback(DWORD dwEffect)
|
|||
if(!IsNull(move)) m = move;
|
||||
}
|
||||
else
|
||||
m = Image::No();
|
||||
m = no;
|
||||
Ctrl::OverrideCursor(m);
|
||||
Ctrl::SetMouseCursor(m);
|
||||
return S_OK;
|
||||
|
|
@ -484,6 +484,7 @@ int Ctrl::DoDragAndDrop(const char *fmts, const Image& sample, dword actions,
|
|||
UDropSource *dsrc = new UDropSource;
|
||||
DWORD result = 0;
|
||||
Image m = Ctrl::OverrideCursor(CtrlCoreImg::DndMove());
|
||||
dsrc->no = MakeDragImage(CtrlCoreImg::DndNone(), CtrlCoreImg::DndNone98(), sample);
|
||||
if(actions & DND_COPY)
|
||||
dsrc->copy = actions & DND_EXACTIMAGE ? sample : MakeDragImage(CtrlCoreImg::DndCopy(), CtrlCoreImg::DndCopy98(), sample);
|
||||
if(actions & DND_MOVE)
|
||||
|
|
|
|||
|
|
@ -772,7 +772,7 @@ Size ArrayCtrl::DoPaint(Draw& w, bool sample) {
|
|||
w.DrawRect(0, r.bottom, size.cx, 1, gridcolor);
|
||||
r.left = 0;
|
||||
r.right = x;
|
||||
if(i == cursor && !nocursor && multiselect && GetSelectCount() != 1 && hasfocus0 && !isdrag)
|
||||
if(i == cursor && !nocursor && multiselect && (GetSelectCount() != 1 || !IsSel(i)) && hasfocus0 && !isdrag)
|
||||
DrawFocus(w, r, st & Display::SELECT ? SColorPaper() : SColorText());
|
||||
r.bottom += horzgrid;
|
||||
r.left = x;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue