From 43692497cba48e8951ebc4f9dfa15946d7332d29 Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Mon, 30 Jan 2023 12:59:10 -0500 Subject: [PATCH] 2023-01-30 Fred Gleason * Fixed a bug in rdlogmanager(1) that would cause the pre-import and post-import event lists to fail to be propagated to the newly created event. Signed-off-by: Fred Gleason --- ChangeLog | 4 ++++ rdlogmanager/edit_event.cpp | 4 +++- rdlogmanager/importcartsmodel.cpp | 16 ++++++++++++++-- rdlogmanager/importcartsmodel.h | 6 ++++-- 4 files changed, 25 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index bce0210f..68fe700c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -23958,3 +23958,7 @@ 2023-01-30 Fred Gleason * Fixed a bug in the voice tracker widget that threw a segfault when the user attempted to select the '--- end of log ---' marker. +2023-01-30 Fred Gleason + * Fixed a bug in rdlogmanager(1) that would cause the pre-import + and post-import event lists to fail to be propagated to the + newly created event. diff --git a/rdlogmanager/edit_event.cpp b/rdlogmanager/edit_event.cpp index ce52bcc9..b982e259 100644 --- a/rdlogmanager/edit_event.cpp +++ b/rdlogmanager/edit_event.cpp @@ -2,7 +2,7 @@ // // Edit a Rivendell Log Event // -// (C) Copyright 2002-2021 Fred Gleason +// (C) Copyright 2002-2023 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as @@ -1156,6 +1156,8 @@ void EditEvent::saveAsData() if(!q->first()) { delete event_event; event_event=new RDEvent(event_name,true); + event_preimport_model->setEventName(event_name); + event_postimport_model->setEventName(event_name); Save(); event_new_events->push_back(event_name); CopyEventPerms(old_name,event_name); diff --git a/rdlogmanager/importcartsmodel.cpp b/rdlogmanager/importcartsmodel.cpp index 03772efa..74ee7e4f 100644 --- a/rdlogmanager/importcartsmodel.cpp +++ b/rdlogmanager/importcartsmodel.cpp @@ -1,8 +1,8 @@ // importcartsmodel.cpp // -// Data model for Rivendell hosts +// Data model for Rivendell rdlogmanager(1) pre- and post-import event lists // -// (C) Copyright 2021 Fred Gleason +// (C) Copyright 2021-2023 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as @@ -64,6 +64,18 @@ ImportCartsModel::~ImportCartsModel() } +QString ImportCartsModel::eventName() const +{ + return d_event_name; +} + + +void ImportCartsModel::setEventName(const QString &str) +{ + d_event_name=str; +} + + QPalette ImportCartsModel::palette() { return d_palette; diff --git a/rdlogmanager/importcartsmodel.h b/rdlogmanager/importcartsmodel.h index 908632d1..cd3cf0d8 100644 --- a/rdlogmanager/importcartsmodel.h +++ b/rdlogmanager/importcartsmodel.h @@ -1,8 +1,8 @@ // importcartsmodel.h // -// Data model for rdlogmanager(1) cart stack lists +// Data model for Rivendell rdlogmanager(1) pre- and post-import event lists // -// (C) Copyright 2021 Fred Gleason +// (C) Copyright 2021-2023 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as @@ -40,6 +40,8 @@ class ImportCartsModel : public QAbstractTableModel ImportCartsModel(const QString &evt_name,ImportType type, bool auto_first_trans,QObject *parent=0); ~ImportCartsModel(); + QString eventName() const; + void setEventName(const QString &str); QPalette palette(); void setPalette(const QPalette &pal); void setFont(const QFont &font);