From eca9e7a1b0439aa28410021c03bdc0c90587a8c6 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Fri, 9 Sep 2016 21:49:46 +0400 Subject: [PATCH] Renaming bands has been fixed --- limereport/lrbanddesignintf.cpp | 9 +++++++-- limereport/lrbanddesignintf.h | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/limereport/lrbanddesignintf.cpp b/limereport/lrbanddesignintf.cpp index b961a0d..140a459 100644 --- a/limereport/lrbanddesignintf.cpp +++ b/limereport/lrbanddesignintf.cpp @@ -295,11 +295,16 @@ void BandDesignIntf::setParentBandName(const QString &parentBandName) { m_parentBandName=parentBandName; if (itemMode()&DesignMode && !m_parentBandName.isEmpty()){ - if ((parentBand()==0)||(parentBand()->objectName()!=parentBandName)) - setParentBand( findParentBand()); + if ((parentBand() == 0 )||(parentBand()->objectName()!= parentBandName)) + setParentBand(findParentBand()); } } +QString BandDesignIntf::parentBandName(){ + if (!m_parentBand) return m_parentBandName; + else return m_parentBand->objectName(); +} + bool BandDesignIntf::isConnectedToBand(BandDesignIntf::BandsType bandType) const { foreach(BandDesignIntf* band,childBands()) if (band->bandType()==bandType) return true; diff --git a/limereport/lrbanddesignintf.h b/limereport/lrbanddesignintf.h index d78b82d..2ae0d8f 100644 --- a/limereport/lrbanddesignintf.h +++ b/limereport/lrbanddesignintf.h @@ -146,7 +146,7 @@ public: void setParentBand(BandDesignIntf* band); void setParentBandName(const QString& parentBandName); - QString parentBandName(){return m_parentBandName;} + QString parentBandName(); bool isConnectedToBand(BandDesignIntf::BandsType bandType) const;