Changeset 1862 for trunk/dll/treecnr.c


Ignore:
Timestamp:
Aug 23, 2015, 2:10:07 AM (10 years ago)
Author:
Gregg Young
Message:

Improve ability of maketop to get directory position in tree correct on first open of states with large and/or deep tree structures

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/treecnr.c

    r1860 r1862  
    102102  07 Aug 15 SHL Rework to use AddFleshWorkRequest rather than direct calls to Stubby/Flesh/Unflesh
    103103  20 Aug 15 SHL Sync with SetFleshFocusPath mods
     104  22 Aug 15 GKY Improve ability of maketop to get directory position in tree correct on first
     105                open of states with large and/or deep tree structures
    104106
    105107***********************************************************************/
     
    308310    goto MakeTop;
    309311  }
    310 
    311   WinEnableWindowUpdate(hwndCnr, FALSE);
    312 
    313   // 2015-08-13 SHL add retry logic
    314   for (found = FALSE, retries = 0; !found && retries < 10; retries++) {
     312  // 2015-08-22 GKY Without this FM2 has NULL pci->pszFileName errors and switch failures
     313  if (fInitialDriveScan)
     314    DosSleep(1500); // 100 still had errors
     315  if (fSwitchTreeOnDirChg)
     316    DosSleep(200);
     317  //WaitFleshWorkListEmpty(0);
     318
     319  // 2015-08-13 SHL add retry logic 2015-08-22 GKY increase retries from 10 to 100 to
     320  // eliminate switch failures on deep or large tree state switches
     321  for (found = FALSE, retries = 0; !found && retries < 100; retries++) {
    315322
    316323    pci = FindCnrRecord(hwndCnr,
     
    347354      if (!pciP || (INT)pciP == -1) {
    348355        DbgMsg(pszSrcFile, __LINE__, "ShowTreeRec FindCnrRecord(%s) returned %p", szDir, pciP); // 2015-08-04 SHL FIXME debug
    349         WaitFleshWorkListEmpty(szDir);          // 2015-08-19 SHL
    350         DosSleep(1000);
     356        WaitFleshWorkListEmpty(szDir);          // 2015-08-19 SHL
    351357        break;                                  // No match
    352358      }
     
    366372      }
    367373
    368       WaitFleshWorkListEmpty(szDir);    // 2015-08-19 SHL
     374      //WaitFleshWorkListEmpty(szDir);  // 2015-08-19 SHL
    369375
    370376      // Add next component to path
     
    429435        WinSendMsg(hwndCnr, CM_EXPANDTREE, MPFROMP(pciToSelect), MPVOID);
    430436      if (fTopDir || maketop)
    431         ShowCnrRecord(hwndCnr, (PMINIRECORDCORE)pciToSelect);
     437        ShowCnrRecord(hwndCnr, (PMINIRECORDCORE)pciToSelect);
    432438
    433439      if (!quickbail) {
     
    441447    }
    442448  }
    443 
    444   WinEnableWindowUpdate(hwndCnr, TRUE);
    445449}
    446450
     
    21072111          else {
    21082112            driveserial[x] = -1;
    2109             WaitFleshWorkListEmpty(NULL);       // 2015-08-13 SHL in case pci still in work list
     2113            //WaitFleshWorkListEmpty(NULL);     // 2015-08-13 SHL in case pci still in work list
    21102114            AddFleshWorkRequest(hwnd, pci, eUnFlesh);
    21112115            PostMsg(hwnd, UM_RESCAN, MPVOID, MPVOID);
Note: See TracChangeset for help on using the changeset viewer.