From 48677d348f0222731f90bde3b9b7d20eddea926c Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Tue, 28 May 2013 03:59:35 +0200 Subject: [PATCH 1/2] Fix issue 679 https://code.google.com/p/singularity-viewer/issues/detail?id=679 Instead of making the cursor just always an arrow, I changed the 'working' cursor from a watch to an arrow + hour glass. Note that the BMP of the 'wait' cursor was exactly the same as the 'working' cursor, so if anywhere 'working' should NOT have an arrow, then that should be replaced with the UI_CURSOR_WAIT to restore the old cursor. Obviously, the blinking is fixed too - cause that is what this all was about. --- indra/llwindow/llwindowsdl.cpp | 2 +- indra/newview/llinventorypanel.cpp | 3 +-- indra/newview/res-sdl/working.BMP | Bin 2102 -> 2102 bytes 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index 80a272789..3c5601337 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -2068,7 +2068,7 @@ void LLWindowSDL::initCursors() mSDLCursors[UI_CURSOR_SIZEWE] = makeSDLCursorFromBMP("sizewe.BMP",16,14); mSDLCursors[UI_CURSOR_SIZENS] = makeSDLCursorFromBMP("sizens.BMP",17,16); mSDLCursors[UI_CURSOR_NO] = makeSDLCursorFromBMP("llno.BMP",8,8); - mSDLCursors[UI_CURSOR_WORKING] = makeSDLCursorFromBMP("working.BMP",12,15); + mSDLCursors[UI_CURSOR_WORKING] = makeSDLCursorFromBMP("working.BMP",0,0); mSDLCursors[UI_CURSOR_TOOLGRAB] = makeSDLCursorFromBMP("lltoolgrab.BMP",2,13); mSDLCursors[UI_CURSOR_TOOLLAND] = makeSDLCursorFromBMP("lltoolland.BMP",1,6); mSDLCursors[UI_CURSOR_TOOLFOCUS] = makeSDLCursorFromBMP("lltoolfocus.BMP",8,5); diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 1503e9402..740f89f00 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -871,8 +871,7 @@ BOOL LLInventoryPanel::handleHover(S32 x, S32 y, MASK mask) BOOL handled = LLView::handleHover(x, y, mask); if(handled) { - ECursorType cursor = getWindow()->getCursor(); - if (LLInventoryModelBackgroundFetch::instance().folderFetchActive() && cursor == UI_CURSOR_ARROW) + if (LLInventoryModelBackgroundFetch::instance().folderFetchActive()) { // replace arrow cursor with arrow and hourglass cursor getWindow()->setCursor(UI_CURSOR_WORKING); diff --git a/indra/newview/res-sdl/working.BMP b/indra/newview/res-sdl/working.BMP index 26dec59afe10818db0cff219f91d41dc647dd754..851dbd5b938318a4a0a3d5585cc21c71638a8a30 100644 GIT binary patch delta 511 zcmaJ;%N2t#40GFX=iU!pp#$`g4cI6{WRaejfvr->CNb&bRqsKJC0j9G#%27xhdhUP z7RfQ(2Ps9PYkq|Z&od!YWEIC+AqaDs?vv&X=Yxm<{+{{5cbQ-?s RiM`$~aOQq(&5sj5rZ3t(IavSz delta 376 zcmdlcuuWitEi2c51}OMH*^xyIFISWYu9$%Vq+GZjDDWQ&fUFZ303;1l0b-*o0Lvj1 zFkqDj*$T1*NTJE+pMdDasQ@YubpxgWCm<$6Oqh-KxvSl(E~vgZ Date: Wed, 29 May 2013 02:37:48 +0200 Subject: [PATCH 2/2] Attempt to fix issue 848 https://code.google.com/p/singularity-viewer/issues/detail?id=848 If advance_state is called, then the state is NOT changed (only sub_state_w->advance_state is set), but sub_state_w->skip_idle is set to true in order to ignore the next call to idle (if the state machine is already in the middle of executing a state). Therefore, this assert would trigger. The solution is to not trigger when skip_idle is set. --- indra/aistatemachine/aistatemachine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/aistatemachine/aistatemachine.cpp b/indra/aistatemachine/aistatemachine.cpp index 4b7470e26..6903589f2 100644 --- a/indra/aistatemachine/aistatemachine.cpp +++ b/indra/aistatemachine/aistatemachine.cpp @@ -615,7 +615,7 @@ void AIStateMachine::multiplex(event_type event) // If the state is bs_multiplex we only need to run again when need_run was set again in the meantime or when this state machine isn't idle. need_new_run = sub_state_r->need_run || !sub_state_r->idle; // If this fails then the run state didn't change and neither idle() nor yield() was called. - llassert_always(!(need_new_run && !mYieldEngine && sub_state_r->run_state == run_state)); + llassert_always(!(need_new_run && !sub_state_r->skip_idle && !mYieldEngine && sub_state_r->run_state == run_state)); } break; case bs_abort: