Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

notice changes to values #5692

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CommonData/column.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,8 @@ columnType Column::setValues(const stringvec & values, const stringvec & labels,

for(size_t i=0; i<values.size(); i++)
{
setValue(i, values[i], labels.size() ? labels[i] : "", false);
if(setValue(i, values[i], labels.size() ? labels[i] : "", false) && aChange)
(*aChange) = true;


if(values[i] != "" || (labels.size() && labels[i] != ""))
Expand Down
2 changes: 1 addition & 1 deletion Desktop/data/datasetpackage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2540,7 +2540,7 @@ Column * DataSetPackage::requestComputedColumnCreation(const std::string & colum

bool DataSetPackage::requestColumnCreation(const std::string & columnName, Analysis * analysis, columnType type)
{
if(DataSetPackage::pkg()->isColumnNameFree(columnName))
if(!DataSetPackage::pkg()->isColumnNameFree(columnName))
return false;

createComputedColumn(columnName, type, computedColumnType::analysisNotComputed, analysis);
Expand Down
15 changes: 8 additions & 7 deletions QMLComponents/boundcontrols/boundcontrolbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,17 @@ void BoundControlBase::handleComputedColumn(const Json::Value& value)
std::string newName = value.asString(),
orgName = orgValue.asString();

if (newName.empty() && !orgName.empty())
emit _control->requestComputedColumnDestruction(orgName);

else if (newName != orgName)
if (newName != orgName)
{
if (_isComputedColumn) emit _control->requestComputedColumnCreation(newName);
else emit _control->requestColumnCreation(newName, _columnType);

if (!orgName.empty())
emit _control->requestComputedColumnDestruction(orgName);

if(!newName.empty())
{
if (_isComputedColumn) emit _control->requestComputedColumnCreation(newName);
else emit _control->requestColumnCreation(newName, _columnType);
}

}
}
}
Expand Down
3 changes: 2 additions & 1 deletion QMLComponents/controls/textinputbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,8 @@ void TextInputBase::setUp()

void TextInputBase::setDisplayValue()
{
setProperty("displayValue", _value);
if(property("displayValue") != _value)
setProperty("displayValue", _value);
}

void TextInputBase::rScriptDoneHandler(const QString &result)
Expand Down
Loading