From ce2321c2c9e183c730e972b68a2c80ea34072a42 Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Sun, 12 Sep 2021 14:44:24 -0400 Subject: [PATCH] 2021-09-12 Fred Gleason * 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 --- ChangeLog | 3 +++ rdlibrary/audio_cart.cpp | 6 +++--- rdlibrary/audio_cart.h | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index df588546..99f30cdd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -22410,3 +22410,6 @@ 2021-09-12 Fred Gleason * Fixed regressions where vestigal accelerator indicators ('&') remained in in-line strings. +2021-09-12 Fred Gleason + * Fixed a regression in rdlibrary(1) that caused the first cut to + fail to be selected automatically when creating a new cart. diff --git a/rdlibrary/audio_cart.cpp b/rdlibrary/audio_cart.cpp index fa71b329..d693de10 100644 --- a/rdlibrary/audio_cart.cpp +++ b/rdlibrary/audio_cart.cpp @@ -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; diff --git a/rdlibrary/audio_cart.h b/rdlibrary/audio_cart.h index aa9c152e..e14b2edb 100644 --- a/rdlibrary/audio_cart.h +++ b/rdlibrary/audio_cart.h @@ -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;