From 7882291cf693f8e6da26c2a5866290151e3af25d Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Tue, 6 Dec 2022 10:28:26 -0500 Subject: [PATCH] 2022-12-06 Fred Gleason * Fixed a bug in 'RDCutDialog' that caused item selections to fail to be cleared when calling 'exec()' to start a new session. Signed-off-by: Fred Gleason --- ChangeLog | 3 +++ lib/rdcut_dialog.cpp | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 1e7ccf86..0d804e54 100644 --- a/ChangeLog +++ b/ChangeLog @@ -23750,3 +23750,6 @@ feed items to be listed twice in the 'Podcast Item List' dialog. * Fixed a bug in 'RDPodcastListModel' that broke item delete notifications. +2022-12-06 Fred Gleason + * Fixed a bug in 'RDCutDialog' that caused item selections to fail + to be cleared when calling 'exec()' to start a new session. diff --git a/lib/rdcut_dialog.cpp b/lib/rdcut_dialog.cpp index eba077d5..fbbf67ae 100644 --- a/lib/rdcut_dialog.cpp +++ b/lib/rdcut_dialog.cpp @@ -178,7 +178,10 @@ int RDCutDialog::exec(QString *cutname) cart_cutname=cutname; cart_ok_button->setEnabled(false); - if(cart_cutname!=NULL) { + if((cart_cutname==NULL)||(cart_cutname->isEmpty())) { + cart_cart_view->selectionModel()->clearSelection(); + } + else { QModelIndex index=cart_cart_model->cartRow(RDCut::cartNumber(*cutname)); if(index.isValid()) { cart_cart_view->setExpanded(index,true);