mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2025-10-02 03:53:21 +03:00
The update of data sources was added if they contain changed variables
This commit is contained in:
@@ -61,6 +61,7 @@ void VariablesHolder::addVariable(const QString& name, const QVariant& value, Va
|
||||
m_varNames.insert(name,varValue);
|
||||
if (type==VarDesc::Report)
|
||||
m_userVariables.append(varValue);
|
||||
emit variableHasBeenAdded(name);
|
||||
} else {
|
||||
throw ReportError(tr("variable with name ")+name+tr(" already exists!"));
|
||||
}
|
||||
@@ -86,6 +87,7 @@ void VariablesHolder::deleteVariable(const QString &name)
|
||||
m_userVariables.removeOne(m_varNames.value(name));
|
||||
delete m_varNames.value(name);
|
||||
m_varNames.remove(name);
|
||||
emit variableHasBennDeleted(name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,6 +95,7 @@ void VariablesHolder::changeVariable(const QString &name, const QVariant &value)
|
||||
{
|
||||
if(m_varNames.contains(name)) {
|
||||
m_varNames.value(name)->setValue(value);
|
||||
emit variableHasBeenChanged(name);
|
||||
} else
|
||||
throw ReportError(tr("variable with name ")+name+tr(" does not exists!"));
|
||||
}
|
||||
|
Reference in New Issue
Block a user