Skip to content

Commit 4c71cd9

Browse files
committed
fix last bug and make code prettier
1 parent a904529 commit 4c71cd9

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

Desktop/data/datasetpackage.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2540,7 +2540,7 @@ Column * DataSetPackage::requestComputedColumnCreation(const std::string & colum
25402540

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

25462546
createComputedColumn(columnName, type, computedColumnType::analysisNotComputed, analysis);

QMLComponents/boundcontrols/boundcontrolbase.cpp

+8-7
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,17 @@ void BoundControlBase::handleComputedColumn(const Json::Value& value)
8383
std::string newName = value.asString(),
8484
orgName = orgValue.asString();
8585

86-
if (newName.empty() && !orgName.empty())
87-
emit _control->requestComputedColumnDestruction(orgName);
88-
89-
else if (newName != orgName)
86+
if (newName != orgName)
9087
{
91-
if (_isComputedColumn) emit _control->requestComputedColumnCreation(newName);
92-
else emit _control->requestColumnCreation(newName, _columnType);
93-
9488
if (!orgName.empty())
9589
emit _control->requestComputedColumnDestruction(orgName);
90+
91+
if(!newName.empty())
92+
{
93+
if (_isComputedColumn) emit _control->requestComputedColumnCreation(newName);
94+
else emit _control->requestColumnCreation(newName, _columnType);
95+
}
96+
9697
}
9798
}
9899
}

QMLComponents/controls/textinputbase.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,8 @@ void TextInputBase::setUp()
214214

215215
void TextInputBase::setDisplayValue()
216216
{
217-
setProperty("displayValue", _value);
217+
if(property("displayValue") != _value)
218+
setProperty("displayValue", _value);
218219
}
219220

220221
void TextInputBase::rScriptDoneHandler(const QString &result)

0 commit comments

Comments
 (0)