Changeset 1270
- Timestamp:
- 09/27/07 22:43:24 (11 months ago)
- Location:
- trunk/src/buzelib
- Files:
-
- 4 modified
-
PatternEditor/PatternEditorInner.cpp (modified) (2 diffs)
-
PatternView.cpp (modified) (33 diffs)
-
WaveEditorCtrl.cpp (modified) (14 diffs)
-
WaveTableView.cpp (modified) (15 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/buzelib/PatternEditor/PatternEditorInner.cpp
r1263 r1270 409 409 410 410 LRESULT CPatternEditorInner::OnChar(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { 411 if (cursor_columns.size() == 0) return 0; 412 411 413 cursor_column& ccol = cursor_columns[cursor.x]; 412 414 … … 852 854 853 855 void CPatternEditorInner::MoveCursor(int x, int y, bool affectsel) { 856 if (cursor_columns.size() == 0) return; 854 857 855 858 POINT last_cursor = cursor; -
trunk/src/buzelib/PatternView.cpp
r1269 r1270 54 54 55 55 LRESULT CTwinCombo::OnSelChange(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) { 56 GetParent().SendMessage(WM_COMMAND, MAKELONG(GetDlgCtrlID(), TWINCOMBO_SELCHANGE), (LPARAM)hWndCtl);56 GetParent().SendMessage(WM_COMMAND, MAKELONG(GetDlgCtrlID(), TWINCOMBO_SELCHANGE), (LPARAM)hWndCtl); 57 57 return 0; 58 58 } 59 59 60 60 LRESULT CTwinCombo::OnCloseUp(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) { 61 GetParent().SendMessage(WM_COMMAND, MAKELONG(GetDlgCtrlID(), TWINCOMBO_CLOSEUP), (LPARAM)hWndCtl);61 GetParent().SendMessage(WM_COMMAND, MAKELONG(GetDlgCtrlID(), TWINCOMBO_CLOSEUP), (LPARAM)hWndCtl); 62 62 return 0; 63 63 } 64 64 65 65 LRESULT CTwinCombo::OnDropDown(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) { 66 GetParent().SendMessage(WM_COMMAND, MAKELONG(GetDlgCtrlID(), TWINCOMBO_DROPDOWN), (LPARAM)hWndCtl);66 GetParent().SendMessage(WM_COMMAND, MAKELONG(GetDlgCtrlID(), TWINCOMBO_DROPDOWN), (LPARAM)hWndCtl); 67 67 return 0; 68 68 } 69 69 70 70 int CTwinCombo::GetComboIndex(HWND hWnd) { 71 if (combo1.m_hWnd == hWnd) return 0;72 if (combo2.m_hWnd == hWnd) return 1;73 return -1;71 if (combo1.m_hWnd == hWnd) return 0; 72 if (combo2.m_hWnd == hWnd) return 1; 73 return -1; 74 74 } 75 75 76 76 int CTwinCombo::GetCurSel(int combo) { 77 CComboBox cc[] = { combo1, combo2 };78 return cc[combo].GetCurSel();77 CComboBox cc[] = { combo1, combo2 }; 78 return cc[combo].GetCurSel(); 79 79 } 80 80 81 81 int CTwinCombo::GetCount(int combo) { 82 CComboBox cc[] = { combo1, combo2 };83 return cc[combo].GetCount();82 CComboBox cc[] = { combo1, combo2 }; 83 return cc[combo].GetCount(); 84 84 } 85 85 86 86 void CTwinCombo::DeleteString(int combo, int index) { 87 CComboBox cc[] = { combo1, combo2 };88 cc[combo].DeleteString(index);87 CComboBox cc[] = { combo1, combo2 }; 88 cc[combo].DeleteString(index); 89 89 } 90 90 91 91 void CTwinCombo::InsertString(int combo, int index, LPCSTR lpcstr) { 92 CComboBox cc[] = { combo1, combo2 };93 cc[combo].InsertString(index, lpcstr);92 CComboBox cc[] = { combo1, combo2 }; 93 cc[combo].InsertString(index, lpcstr); 94 94 } 95 95 96 96 void CTwinCombo::SelectString(int combo, int index, LPCSTR lpcstr) { 97 CComboBox cc[] = { combo1, combo2 };98 cc[combo].SelectString(index, lpcstr);97 CComboBox cc[] = { combo1, combo2 }; 98 cc[combo].SelectString(index, lpcstr); 99 99 } 100 100 … … 112 112 113 113 CPatternView::CPatternView(CMainFrame* mainFrm, ClientViewListener* cvl) 114 :CViewImpl<CMainFrame, CDocument, CPatternView>(mainFrm->document)114 :CViewImpl<CMainFrame, CDocument, CPatternView>(mainFrm->document) 115 115 ,clientViewListener( cvl) 116 116 ,mainFrame(mainFrm) 117 117 { 118 pattern = document->getSelectedPattern();119 machine = document->getSelectedPatternMachine();118 pattern = document->getSelectedPattern(); 119 machine = document->getSelectedPatternMachine(); 120 120 121 121 fromSequencerTrack=-1; … … 126 126 127 127 CPatternView::~CPatternView(void) { 128 HIMAGELIST hImageList = (HIMAGELIST)::SendMessage(hWndButtonToolBar, TB_SETIMAGELIST, 0, 0);129 ImageList_Destroy(hImageList);130 131 if (m_hWnd)132 DestroyWindow();128 HIMAGELIST hImageList = (HIMAGELIST)::SendMessage(hWndButtonToolBar, TB_SETIMAGELIST, 0, 0); 129 ImageList_Destroy(hImageList); 130 131 if (m_hWnd) 132 DestroyWindow(); 133 133 } 134 134 … … 230 230 231 231 LRESULT CPatternView::OnClose(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) { 232 setPattern(0,0); // in case pattern is deleted and window updated before window is fully destroyed232 setPattern(0,0); // in case pattern is deleted and window updated before window is fully destroyed 233 233 234 234 CMessageLoop* pLoop = _Module.GetMessageLoop(); … … 237 237 pLoop->RemoveMessageFilter(this); 238 238 239 document->removeView(this);239 document->removeView(this); 240 240 mainFrame->removeTimerHandler(this); 241 241 mainFrame->removeTabableView(m_hWnd); … … 249 249 GetClientRect(&rc); 250 250 patternEditor.MoveWindow(0, getToolbarHeight(), rc.right, rc.bottom - getToolbarHeight() - 20); 251 statusBar.MoveWindow(0, rc.bottom - 20, rc.right, 20);252 253 RECT rcItem;254 getBandRect(waveDropDown, &rcItem);255 waveDropDown.MoveWindow(rcItem.left, rcItem.top, rcItem.right-rcItem.left, rcItem.bottom-rcItem.top + 200);256 257 getBandRect(octaveDropDown, &rcItem);258 octaveDropDown.MoveWindow(rcItem.left, rcItem.top, rcItem.right-rcItem.left, rcItem.bottom-rcItem.top + 200);259 260 getBandRect(stepDropDown, &rcItem);261 stepDropDown.MoveWindow(rcItem.left, rcItem.top, rcItem.right-rcItem.left, rcItem.bottom-rcItem.top + 200);251 statusBar.MoveWindow(0, rc.bottom - 20, rc.right, 20); 252 253 RECT rcItem; 254 getBandRect(waveDropDown, &rcItem); 255 waveDropDown.MoveWindow(rcItem.left, rcItem.top, rcItem.right-rcItem.left, rcItem.bottom-rcItem.top + 200); 256 257 getBandRect(octaveDropDown, &rcItem); 258 octaveDropDown.MoveWindow(rcItem.left, rcItem.top, rcItem.right-rcItem.left, rcItem.bottom-rcItem.top + 200); 259 260 getBandRect(stepDropDown, &rcItem); 261 stepDropDown.MoveWindow(rcItem.left, rcItem.top, rcItem.right-rcItem.left, rcItem.bottom-rcItem.top + 200); 262 262 263 263 return 0; … … 271 271 LRESULT CPatternView::OnFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { 272 272 mainFrame->setCurrentFocus(m_hWnd); 273 patternEditor.SetFocus();273 patternEditor.SetFocus(); 274 274 275 275 document->selectPattern(machine, pattern); 276 return 0;276 return 0; 277 277 } 278 278 … … 299 299 LRESULT CPatternView::OnDelete(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& bHandled) { 300 300 301 if (pattern == 0) return 0;301 if (pattern == 0) return 0; 302 302 303 303 if (patternEditor.HasSelection() && !document->configuration->getStickySelections()) { 304 304 deletePatternSelection(); 305 305 } else { 306 pattern_position pos = document->getPatternPosition(machine, pattern);306 pattern_position pos = document->getPatternPosition(machine, pattern); 307 307 document->deleteRow(machine, pattern, pos.group, pos.track, -1, pos.row); 308 308 } … … 311 311 312 312 LRESULT CPatternView::OnSelectAll(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& bHandled) { 313 if (pattern == 0) return 0; 314 313 315 patternEditor.SelectRange(0, 0, patternEditor.GetColumns() - 1, pattern->getRows() - 1); 314 316 return 0; … … 316 318 317 319 LRESULT CPatternView::OnClearSelection(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& bHandled) { 320 if (pattern == 0) return 0; 321 318 322 patternEditor.SelectRange(-1, -1, -1, -1); 319 323 return 0; … … 321 325 322 326 LRESULT CPatternView::OnViewProperties(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& bHandled) { 323 if (pattern == 0) return 0;324 325 document->selectedPropertyProvider = new CPatternPropertyProvider(*this, document, machine, pattern);326 document->updateAllViews(0, UpdateProperties);327 if (pattern == 0) return 0; 328 329 document->selectedPropertyProvider = new CPatternPropertyProvider(*this, document, machine, pattern); 330 document->updateAllViews(0, UpdateProperties); 327 331 return 0; 328 332 } 329 333 330 334 LRESULT CPatternView::OnOctaveSelChange(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) { 331 int sel = octaveDropDown.GetCurSel();332 if (sel == -1) return 0;333 char pc[32];334 octaveDropDown.GetLBText(sel, pc);335 patternEditor.SetOctave(atoi(pc));336 return 0;335 int sel = octaveDropDown.GetCurSel(); 336 if (sel == -1) return 0; 337 char pc[32]; 338 octaveDropDown.GetLBText(sel, pc); 339 patternEditor.SetOctave(atoi(pc)); 340 return 0; 337 341 } 338 342 339 343 LRESULT CPatternView::OnStepSelChange(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) { 340 int sel = stepDropDown.GetCurSel();341 if (sel == -1) return 0;342 char pc[32];343 stepDropDown.GetLBText(sel, pc);344 patternEditor.editor.step = atoi(pc);345 return 0;344 int sel = stepDropDown.GetCurSel(); 345 if (sel == -1) return 0; 346 char pc[32]; 347 stepDropDown.GetLBText(sel, pc); 348 patternEditor.editor.step = atoi(pc); 349 return 0; 346 350 } 347 351 348 352 LRESULT CPatternView::OnPatternClone(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { 349 if (pattern == 0) return 0;350 351 document->clonePattern(machine, pattern);353 if (pattern == 0) return 0; 354 355 document->clonePattern(machine, pattern); 352 356 353 357 zzub::pattern* clonedPattern = machine->getPattern(machine->getPatterns()-1); … … 358 362 359 363 LRESULT CPatternView::OnMachineAddTrack(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { 364 if (machine == 0) return 0; 360 365 document->addPatternTrack(machine); 361 366 mainFrame->SetFocus(); // this line is here because utrk changes focus in buze only … … 364 369 365 370 LRESULT CPatternView::OnMachineRemoveTrack(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { 371 if (machine == 0) return 0; 372 366 373 document->removePatternTrack(machine); 367 374 mainFrame->SetFocus(); // this line is here because utrk changes focus in buze only … … 370 377 371 378 LRESULT CPatternView::OnPatternPlay(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { 372 if (pattern == 0) return 0; 373 374 375 document->playPattern(machine, pattern); 379 if (pattern == 0) return 0; 380 document->playPattern(machine, pattern); 376 381 return 0; 377 382 } 378 383 379 384 LRESULT CPatternView::OnPatternPlayFromCursor(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { 380 if (pattern == 0) return 0;385 if (pattern == 0) return 0; 381 386 382 387 pattern_position pos = document->getPatternPosition(machine, pattern); 383 document->playPattern(machine, pattern, pos.row);388 document->playPattern(machine, pattern, pos.row); 384 389 return 0; 385 390 } … … 392 397 393 398 LRESULT CPatternView::OnPatternDelete(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { 394 if (pattern == 0) return 0; 395 396 document->deletePattern(machine, pattern); 399 if (pattern == 0) return 0; 400 document->deletePattern(machine, pattern); 397 401 return 0; 398 402 } 399 403 400 404 LRESULT CPatternView::OnPatternDoubleRows(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { 401 if (pattern == 0) return 0;405 if (pattern == 0) return 0; 402 406 document->doublePatternRows(machine, pattern); 403 407 return 0; … … 406 410 // test 010 407 411 LRESULT CPatternView::OnPatternDoubleLength(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { 408 if (pattern == 0) return 0;412 if (pattern == 0) return 0; 409 413 document->setPatternLength(machine, pattern, pattern->getRows() * 2); 410 414 return 0; … … 413 417 414 418 LRESULT CPatternView::OnPatternHalveRows(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { 415 if (pattern == 0) return 0;419 if (pattern == 0) return 0; 416 420 document->halvePatternRows(machine, pattern); 417 421 return 0; … … 419 423 420 424 LRESULT CPatternView::OnSelChangeScale(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { 421 int sel = scaleDropDown.GetCurSel();422 if (sel == -1) return 0;423 patternEditor.SetSkip(sel+1);425 int sel = scaleDropDown.GetCurSel(); 426 if (sel == -1) return 0; 427 patternEditor.SetSkip(sel+1); 424 428 return 0; 425 429 } 426 430 427 431 LRESULT CPatternView::OnSelChangeBeat(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { 428 int sel = beatDropDown.GetCurSel();429 if (sel == -1) return 0;432 int sel = beatDropDown.GetCurSel(); 433 if (sel == -1) return 0; 430 434 // patternEditor.beat = sel; 431 435 patternEditor.Invalidate(); … … 434 438 435 439 void CPatternView::OnUpdate(CView* pSender, LPARAM lHint, LPVOID pHint) { 436 zzub::metaplugin* updatePlugin = 0;437 zzub::pattern* updatePattern = 0;438 PatternEditorMode mode = (PatternEditorMode)_Module.configuration->getPatternMode();439 440 if (machine == 0 && pattern == 0) return ;441 442 switch (lHint) {440 zzub::metaplugin* updatePlugin = 0; 441 zzub::pattern* updatePattern = 0; 442 PatternEditorMode mode = (PatternEditorMode)_Module.configuration->getPatternMode(); 443 444 if (machine == 0 && pattern == 0) return ; 445 446 switch (lHint) { 443 447 case UpdatePatternScroll: 444 updatePattern = (zzub::pattern*)pHint;445 if (updatePattern == pattern) {448 updatePattern = (zzub::pattern*)pHint; 449 if (updatePattern == pattern) { 446 450 //patternEditor.Invalidate(); 447 //patternEditor.UpdateCaret();448 }451 //patternEditor.UpdateCaret(); 452 } 449 453 break; 450 case UpdatePatternPosition:451 updatePattern = (zzub::pattern*)pHint;452 if (updatePattern == pattern) {453 patternEditor.ScrollToView();454 //patternEditor.invalidateCursor();455 bindStatus();456 }457 break;458 case UpdateSelectedPattern:459 updatePattern = (zzub::pattern*)pHint;460 if (updatePattern == 0 || updatePattern == pattern) {461 //patternEditor.Invalidate();454 case UpdatePatternPosition: 455 updatePattern = (zzub::pattern*)pHint; 456 if (updatePattern == pattern) { 457 patternEditor.ScrollToView(); 458 //patternEditor.invalidateCursor(); 459 bindStatus(); 460 } 461 break; 462 case UpdateSelectedPattern: 463 updatePattern = (zzub::pattern*)pHint; 464 if (updatePattern == 0 || updatePattern == pattern) { 465 //patternEditor.Invalidate(); 462 466 patternEditor.editor.Invalidate(); 463 patternEditor.UpdateCaret();464 }465 break;466 case UpdateSelectedMachine:467 updatePlugin = (metaplugin*)pHint;468 if (updatePlugin == machine) {469 bindPatternEditor();470 patternEditor.ScrollToView();471 patternEditor.UpdateScrollbars();472 patternEditor.UpdateCaret();467 patternEditor.UpdateCaret(); 468 } 469 break; 470 case UpdateSelectedMachine: 471 updatePlugin = (metaplugin*)pHint; 472 if (updatePlugin == machine) { 473 bindPatternEditor(); 474 patternEditor.ScrollToView(); 475 patternEditor.UpdateScrollbars(); 476 patternEditor.UpdateCaret(); 473 477 patternEditor.Invalidate(FALSE); 474 478 patternEditor.editor.Invalidate(FALSE); 475 bindMachinePatternPanel(); 476 } 477 break; 478 case UpdateDeletePattern: 479 updatePattern = (zzub::pattern*)pHint; 480 if (updatePattern == pattern) { 481 if (mode == OneEditorOverall || mode == OneEditorPerMachine) { 482 // move to next pattern if it exists 483 size_t patternIndex = machine->getPatternIndex(pattern); 484 zzub::pattern* nextPattern = 0; 485 if (patternIndex < machine->getPatterns() -1) 486 nextPattern = machine->getPattern(patternIndex + 1); else 487 if (patternIndex > 0) 488 nextPattern = machine->getPattern(patternIndex - 1); else 489 nextPattern = 0; 490 491 setPattern(machine, nextPattern); 492 } else { 493 mainFrame->clientViewHide(m_hWnd); 494 } 495 } 496 break; 497 case UpdateDeleteMachine: 498 updatePlugin = (metaplugin*)pHint; 499 if (updatePlugin == machine) { 500 if (mode == OneEditorOverall) { 501 setPattern(0, 0); 502 } else { 503 mainFrame->clientViewHide(m_hWnd); 504 } 505 } 506 break; 507 /*case UpdateEditPattern: 508 //patternEditor.UpdateScrollbars(); 509 //patternEditor.UpdateCaret(); 510 bindStatus(); 511 break;*/ 512 case UpdatePattern: 513 case UpdateMachines: 514 bindMachinePatternPanel(); 515 break; 516 case UpdateTheme: 517 patternEditor.UpdateWindow(); 479 bindMachinePatternPanel(); 480 } 518 481 break; 519 case UpdatePatternSelection: 520 patternEditor.UpdateWindow(); 521 bindStatus(); 522 break; 482 case UpdateDeletePattern: 483 updatePattern = (zzub::pattern*)pHint; 484 if (updatePattern == pattern) { 485 if (mode == OneEditorOverall || mode == OneEditorPerMachine) { 486 // move to next pattern if it exists 487 size_t patternIndex = machine->getPatternIndex(pattern); 488 zzub::pattern* nextPattern = 0; 489 if (patternIndex < machine->getPatterns() -1) 490 nextPattern = machine->getPattern(patternIndex + 1); else 491 if (patternIndex > 0) 492 nextPattern = machine->getPattern(patternIndex - 1); else 493 nextPattern = 0; 494 495 setPattern(machine, nextPattern); 496 } else { 497 mainFrame->clientViewHide(m_hWnd); 498 } 499 } 500 break; 501 case UpdateDeleteMachine: 502 updatePlugin = (metaplugin*)pHint; 503 if (updatePlugin == machine) { 504 if (mode == OneEditorOverall) { 505 setPattern(0, 0); 506 } else { 507 mainFrame->clientViewHide(m_hWnd); 508 } 509 } 510 break; 511 /*case UpdateEditPattern: 512 //patternEditor.UpdateScrollbars(); 513 //patternEditor.UpdateCaret(); 514 bindStatus(); 515 break;*/ 516 case UpdatePattern: 517 case UpdateMachines: 518 bindMachinePatternPanel(); 519 break; 520 case UpdateTheme: 521 patternEditor.UpdateWindow(); 522 break; 523 case UpdatePatternSelection: 524 patternEditor.UpdateWindow(); 525 bindStatus(); 526 break; 523 527 case UpdateImportWave: 524 528 case UpdateClearWave: … … 535 539 break; 536 540 } 537 }538 // set dirty flags based on hint and invalidate if anything needs redrawing541 } 542 // set dirty flags based on hint and invalidate if anything needs redrawing 539 543 } 540 544 541 545 LRESULT CPatternView::OnMachinePatternSelChange(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) { 542 int changedCombo = machinePatternPanel.GetComboIndex(hWndCtl);543 if (changedCombo == -1) return 0;546 int changedCombo = machinePatternPanel.GetComboIndex(hWndCtl); 547 if (changedCombo == -1) return 0; 544 548 545 549 int machineIndex = machinePatternPanel.GetCurSel(0); 546 550 int patternIndex = 0; 547 if (changedCombo == 1)548 patternIndex = machinePatternPanel.GetCurSel(1);549 550 if (machineIndex == -1) return 0;551 if (changedCombo == 1) 552 patternIndex = machinePatternPanel.GetCurSel(1); 553 554 if (machineIndex == -1) return 0; 551 555 552 556 CHAR machineName[1024]; … … 558 562 559 563 mainFrame->showPatternEditor(pattern, machine); 560 return 0;564 return 0; 561 565 } 562 566 … … 759 763 metaplugin* tempmac = document->player->getMachine(machineName); 760 764 if (tempmac) 761 mainFrame->showPatternEditor(tempmac->getPattern(0), tempmac);762 return 0;765 mainFrame->showPatternEditor(tempmac->getPattern(0), tempmac); 766 return 0; 763 767 764 768 } … … 770 774 metaplugin* tempmac = document->player->getMachine(machineName);//index-1); 771 775 if (tempmac) 772 mainFrame->showPatternEditor(tempmac->getPattern(0), tempmac);773 return 0;776 mainFrame->showPatternEditor(tempmac->getPattern(0), tempmac); 777 return 0; 774 778 } 775 779 776 780 777 781 void CPatternView::transposeSelection(int delta) { 782 if (pattern == 0) return ; 783 778 784 patterntrack* selection = createSelection(); 779 785 if (!selection) { … … 874 880 875 881 LRESULT CPatternView::OnInterpolateSelection(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) { 882 if (pattern == 0) return 0; 883 876 884 patterntrack* selection = createSelection(); 877 885 if (!selection) return 0; … … 896 904 897 905 LRESULT CPatternView::OnRandomizeSelection(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) { 906 if (pattern == 0) return 0; 907 898 908 patterntrack* selection = createSelection(); 899 909 if (!selection) { … … 943 953 944 954 LRESULT CPatternView::OnClearEntry(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) { 955 if (pattern == 0) return 0; 945 956 946 957 patternEditor.Clear(); … … 967 978 968 979 LRESULT CPatternView::OnSoloMachine(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) { 980 if (machine == 0) return 0; 981 969 982 if (document->player->getSoloMachine()==machine) 970 983 document->setMachineSolo(machine, FALSE); else … … 974 987 975 988 LRESULT CPatternVie
