Changeset 1316

Show
Ignore:
Timestamp:
11/23/07 20:44:47 (9 months ago)
Author:
calvin
Message:

zoner: setMachineLongestPattern after load and fix playback issues in sequencer
calvin: fix resize problem vs selected item in property view drop down items

Location:
trunk/src/buzelib
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/buzelib/Document.cpp

    r1315 r1316  
    12431243        bool status = undoManager.insertAndCommit(redo, undo); 
    12441244 
    1245         for (int j = numMachines; j < player->getMachines(); j++) { 
     1245        for (int j = 0; j < player->getMachines(); j++) { 
    12461246                metaplugin* machine = player->getMachine(j); 
    1247                 MachineDelete* del = new MachineDelete(); 
    1248                 del->init(machine->getName()); 
    1249                 undo->actions.push_back(del); 
     1247                if(j >= numMachines) { 
     1248                        MachineDelete* del = new MachineDelete(); 
     1249                        del->init(machine->getName()); 
     1250                        undo->actions.push_back(del); 
     1251                } 
     1252 
     1253                // set the longest pattern length for sequencer highlight 
     1254 
     1255                size_t maxlen = 0; 
     1256                for(size_t k = 0; k < machine->getPatterns(); ++k) { 
     1257                        if(machine->getPattern(k)->getRows() > maxlen) { 
     1258                                maxlen = machine->getPattern(k)->getRows(); 
     1259                        } 
     1260                } 
     1261                setMachineLongestPattern(machine, maxlen); 
    12501262        } 
    12511263 
  • trunk/src/buzelib/PropertyList/PropertyItemEditors.h

    r1273 r1316  
    467467      RECT rc = { rcWin.left, rcWin.bottom, rcWin.right, rcWin.bottom + m_cyList }; 
    468468      m_wndList.SetWindowPos(HWND_TOPMOST, &rc, SWP_SHOWWINDOW); 
     469          // Make sure selected item is still visible after the resize 
     470          m_wndList.SetCurSel(m_wndList.GetCurSel()); 
    469471      return 0; 
    470472   } 
  • trunk/src/buzelib/SequenceEditor.cpp

    r1315 r1316  
    456456                        copyTrack.iterateTick(); 
    457457                int patternLengthRemain=0; 
    458                 patternLengthRemain = getPatternLengthRemain(t,  k ? k-1 : k); 
     458                patternLengthRemain = getPatternLengthRemain(&copyTrack,  k ? k-1 : k); 
    459459                for (size_t j=0; j<maxRows; j++) { 
    460460            sequence_event* event = copyTrack.getCurrentValue();