mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-10-01 18:50:16 +03:00
Improve Git History navigation and asynchronous UI safety
Add a History ref selector for HEAD, local branches, remote branches, and tags without requiring checkout. Reuse cached branch-model display strings to keep large ref lists efficient. Make deferred main-thread callbacks lifetime-safe across ecode controllers and plugins. Initialize plugin dispatchers during UIReady and extend MainThreadLifetime to support delayed and tagged dispatch. Fix expandable Git History rows, empty merge projections, and commit-description expansion. Display only the physical first line while collapsed and avoid duplicating it in the expanded body. Add coverage for history ref handling and preserve stale-request guards during repository and revision changes. Fix UIImageViewer dimension reporting for sprites by displaying the underlying texture dimensions. The Git History interface remains a work in progress.
This commit is contained in:
@@ -134,6 +134,7 @@ class EE_API Event {
|
||||
OnApply,
|
||||
OnShowFindReplace,
|
||||
OnHideFindReplace,
|
||||
OnTooltipCreated,
|
||||
NoEvent = eeINDEX_NOT_FOUND
|
||||
};
|
||||
|
||||
|
||||
@@ -30,7 +30,8 @@ template <typename T> class MainThreadLifetime {
|
||||
public:
|
||||
WeakHandle() = default;
|
||||
|
||||
void run( std::function<void( T* )> callback ) const {
|
||||
void run( std::function<void( T* )> callback, const Time& delay = Time::Zero,
|
||||
Action::UniqueID tag = 0 ) const {
|
||||
auto state = mState.lock();
|
||||
if ( !state )
|
||||
return;
|
||||
@@ -49,7 +50,8 @@ template <typename T> class MainThreadLifetime {
|
||||
}
|
||||
if ( object )
|
||||
callback( object );
|
||||
} );
|
||||
},
|
||||
delay, tag );
|
||||
}
|
||||
|
||||
explicit operator bool() const { return !mState.expired(); }
|
||||
|
||||
Reference in New Issue
Block a user