diff --git a/common.pri b/common.pri index 2f44d60..b9ffbe0 100644 --- a/common.pri +++ b/common.pri @@ -134,7 +134,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 5 -LIMEREPORT_VERSION_RELEASE = 66 +LIMEREPORT_VERSION_RELEASE = 67 LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}' DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\" diff --git a/limereport/databrowser/lrdatabrowser.cpp b/limereport/databrowser/lrdatabrowser.cpp index d475826..32e9995 100644 --- a/limereport/databrowser/lrdatabrowser.cpp +++ b/limereport/databrowser/lrdatabrowser.cpp @@ -677,7 +677,7 @@ SQLEditResult::ResultMode DataBrowser::currentDatasourceType(const QString& data void DataBrowser::applyChanges(SQLEditResult result) { - if (result.resultMode == currentDatasourceType(result.datasourceName)){ + if (result.resultMode == currentDatasourceType(result.oldDatasourceName)){ switch(result.resultMode){ case SQLEditResult::Query: changeQuery(result); @@ -694,7 +694,7 @@ void DataBrowser::applyChanges(SQLEditResult result) default: break; } } else { - removeDatasource(result.datasourceName); + removeDatasource(result.oldDatasourceName); addDatasource(result); } activateItem(result.datasourceName, DataBrowserTree::Table); diff --git a/limereport/lrdatasourcemanager.cpp b/limereport/lrdatasourcemanager.cpp index f45bf4d..382a05c 100644 --- a/limereport/lrdatasourcemanager.cpp +++ b/limereport/lrdatasourcemanager.cpp @@ -675,8 +675,6 @@ CSVDesc *DataSourceManager::csvByName(const QString &datasourceName) void DataSourceManager::removeDatasource(const QString &name) { - invalidateLinkedDatasources(name); - if (m_datasources.contains(name)){ IDataSourceHolder *holder; holder=m_datasources.value(name); @@ -703,6 +701,7 @@ void DataSourceManager::removeDatasource(const QString &name) delete m_csvs.at(csvIndex); m_csvs.removeAt(csvIndex); } + invalidateLinkedDatasources(name); m_hasChanges = true; emit datasourcesChanged(); } @@ -1348,12 +1347,12 @@ void DataSourceManager::invalidateLinkedDatasources(QString datasourceName) { foreach(QString name, dataSourceNames()){ if (isSubQuery(name)){ - if (subQueryByName(name)->master() == datasourceName) + if (subQueryByName(name)->master().compare(datasourceName) == 0) dataSourceHolder(name)->invalidate(designTime()?IDataSource::DESIGN_MODE:IDataSource::RENDER_MODE); } if (isProxy(name)){ ProxyDesc* proxy = proxyByName(name); - if ((proxy->master() == datasourceName) || (proxy->child() == datasourceName)) + if ((proxy->master().compare(datasourceName) == 0) || (proxy->child().compare(datasourceName) == 0)) dataSourceHolder(name)->invalidate(designTime()?IDataSource::DESIGN_MODE:IDataSource::RENDER_MODE); }