2021-09-12 Fred Gleason <fredg@paravelsystems.com>

* Fixed a regression in rdlibrary(1) that caused the first cut to
	fail to be selected automatically when creating a new cart.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2021-09-12 14:44:24 -04:00
parent f0d871c9da
commit ce2321c2c9
3 changed files with 8 additions and 5 deletions

View File

@ -22410,3 +22410,6 @@
2021-09-12 Fred Gleason <fredg@paravelsystems.com>
* Fixed regressions where vestigal accelerator indicators ('&')
remained in in-line strings.
2021-09-12 Fred Gleason <fredg@paravelsystems.com>
* Fixed a regression in rdlibrary(1) that caused the first cut to
fail to be selected automatically when creating a new cart.

View File

@ -34,14 +34,14 @@
bool import_active=false;
AudioCart::AudioCart(AudioControls *controls,RDCart *cart,QString *path,
bool select_cut,bool profile_rip,QWidget *parent)
bool new_cart,bool profile_rip,QWidget *parent)
: RDWidget(parent)
{
rdcart_import_metadata=true;
rdcart_controls=controls;
rdcart_cart=cart;
rdcart_import_path=path;
rdcart_select_cut=select_cut;
rdcart_new_cart=new_cart;
rdcart_profile_rip=profile_rip;
rdcart_modification_allowed=rda->user()->editAudio()&&cart->owner().isEmpty();
@ -226,7 +226,7 @@ void AudioCart::changeCutScheduling(int sched)
if(rdcart_cut_model->rowCount()>0) {
RDCut *cut=
new RDCut(rdcart_cut_model->cutName(rdcart_cut_model->index(0,0)));
if(cut->validity()==RDCut::AlwaysValid) {
if((cut->validity()==RDCut::AlwaysValid)||rdcart_new_cart) {
rdcart_cut_view->selectRow(0);
}
delete cut;

View File

@ -36,7 +36,7 @@ class AudioCart : public RDWidget
{
Q_OBJECT
public:
AudioCart(AudioControls *controls,RDCart *cart,QString *path,bool select_cut,
AudioCart(AudioControls *controls,RDCart *cart,QString *path,bool new_cart,
bool profile_rip,QWidget *parent=0);
~AudioCart();
QSize sizeHint() const;
@ -74,7 +74,7 @@ class AudioCart : public RDWidget
RDCutListModel *rdcart_cut_model;
unsigned rdcart_average_length;
QString *rdcart_import_path;
bool rdcart_select_cut;
bool rdcart_new_cart;
AudioControls *rdcart_controls;
QPushButton *paste_cut_button;
bool rdcart_modification_allowed;