Core, Docking, Turtle: Event related fixes

git-svn-id: svn://ultimatepp.org/upp/trunk@10272 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2016-10-04 11:37:19 +00:00
commit 5189317987
3 changed files with 5 additions and 5 deletions

View file

@ -64,8 +64,8 @@ public:
Function Proxy() const { return [=] (ArgTypes... args) { return (*this)(args...); }; }
template <class F>
Function& operator<<(F fn) { if(!ptr) { Copy(fn); return *this; }
WrapperBase *b = ptr; ptr = new Wrapper2<F>(*this, fn); Free(b); return *this; }
Function& operator<<(F fn) { if(!ptr) { Pick(pick(fn)); return *this; }
WrapperBase *b = ptr; ptr = new Wrapper2<F>(*this, pick(fn)); Free(b); return *this; }
Function& operator<<(const Function& fn) { if(!ptr) { Copy(fn); return *this; }
WrapperBase *b = ptr; ptr = new Wrapper2<Function>(*this, fn); Free(b); return *this; }

View file

@ -132,8 +132,8 @@ void AutoHideBar::TabHighlight()
if (c) {
ASSERT(ix >= 0 && ix < GetCount());
// Clear WhenHighlight ot prevent stack overflow. Perhaps a better solution should be found...
Callback cb = WhenHighlight;
WhenHighlight = Callback();
Event<> cb = WhenHighlight;
WhenHighlight = Null;
SetCursor(ix);
ShowAnimate(c);
WhenHighlight = cb;

View file

@ -45,7 +45,7 @@ void TopWindow::SyncCaption()
frame->sizeable = sizeable;
frame->RefreshLayout();
frame->Refresh();
frame->close <<= Proxy(WhenClose);
frame->close.WhenAction = Proxy(WhenClose);
frame->icon = icon;
frame->Enable(IsEnabled());
}