1330 |
//TODO: we should better move the code from MainWindow::on_sample_label_drop_drag_data_received() here |
//TODO: we should better move the code from MainWindow::on_sample_label_drop_drag_data_received() here |
1331 |
|
|
1332 |
// currently commented because we're sending a similar signal in MainWindow::on_sample_label_drop_drag_data_received() |
// currently commented because we're sending a similar signal in MainWindow::on_sample_label_drop_drag_data_received() |
1333 |
//dimreg_to_be_changed_signal.emit(dimregion); |
//DimRegionChangeGuard(this, dimregion); |
1334 |
|
|
1335 |
// make sure stereo samples always are the same in both |
// make sure stereo samples always are the same in both |
1336 |
// dimregs in the samplechannel dimension |
// dimregs in the samplechannel dimension |
1400 |
update_model--; |
update_model--; |
1401 |
|
|
1402 |
sample_ref_changed_signal.emit(oldref, sample); |
sample_ref_changed_signal.emit(oldref, sample); |
|
// currently commented because we're sending a similar signal in MainWindow::on_sample_label_drop_drag_data_received() |
|
|
//dimreg_changed_signal.emit(dimreg); |
|
1403 |
return true; |
return true; |
1404 |
} |
} |
1405 |
return false; |
return false; |
1468 |
if (value) { |
if (value) { |
1469 |
// create a new sample loop in case there is none yet |
// create a new sample loop in case there is none yet |
1470 |
if (!d->SampleLoops) { |
if (!d->SampleLoops) { |
1471 |
|
DimRegionChangeGuard(this, d); |
1472 |
|
|
1473 |
DLS::sample_loop_t loop; |
DLS::sample_loop_t loop; |
1474 |
loop.LoopType = gig::loop_type_normal; |
loop.LoopType = gig::loop_type_normal; |
1475 |
// loop the whole sample by default |
// loop the whole sample by default |
1476 |
loop.LoopStart = 0; |
loop.LoopStart = 0; |
1477 |
loop.LoopLength = |
loop.LoopLength = |
1478 |
(d->pSample) ? d->pSample->SamplesTotal : 0; |
(d->pSample) ? d->pSample->SamplesTotal : 0; |
|
dimreg_to_be_changed_signal.emit(d); |
|
1479 |
d->AddSampleLoop(&loop); |
d->AddSampleLoop(&loop); |
|
dimreg_changed_signal.emit(d); |
|
1480 |
} |
} |
1481 |
} else { |
} else { |
1482 |
if (d->SampleLoops) { |
if (d->SampleLoops) { |
1483 |
dimreg_to_be_changed_signal.emit(d); |
DimRegionChangeGuard(this, d); |
1484 |
|
|
1485 |
// delete ALL existing sample loops |
// delete ALL existing sample loops |
1486 |
while (d->SampleLoops) { |
while (d->SampleLoops) { |
1487 |
d->DeleteSampleLoop(&d->pSampleLoops[0]); |
d->DeleteSampleLoop(&d->pSampleLoops[0]); |
1488 |
} |
} |
|
dimreg_changed_signal.emit(d); |
|
1489 |
} |
} |
1490 |
} |
} |
1491 |
} |
} |
1535 |
gig::Sample* oldref = dimregion->pSample; |
gig::Sample* oldref = dimregion->pSample; |
1536 |
if (!oldref) return; |
if (!oldref) return; |
1537 |
|
|
1538 |
dimreg_to_be_changed_signal.emit(dimregion); |
DimRegionChangeGuard(this, dimregion); |
1539 |
|
|
1540 |
// in case currently assigned sample is a stereo one, then remove both |
// in case currently assigned sample is a stereo one, then remove both |
1541 |
// references (expected to be due to a "stereo dimension") |
// references (expected to be due to a "stereo dimension") |
1573 |
set_dim_region(dimregion); |
set_dim_region(dimregion); |
1574 |
|
|
1575 |
sample_ref_changed_signal.emit(oldref, NULL); |
sample_ref_changed_signal.emit(oldref, NULL); |
|
dimreg_changed_signal.emit(dimregion); |
|
1576 |
} |
} |
1577 |
|
|
1578 |
void DimRegionEdit::onButtonSelectSamplePressed() { |
void DimRegionEdit::onButtonSelectSamplePressed() { |