Skip to content

added set label (for ObjectLabel) in information block#275

Merged
ABSitf merged 4 commits intomasterfrom
i726_change_label
Jul 15, 2022
Merged

added set label (for ObjectLabel) in information block#275
ABSitf merged 4 commits intomasterfrom
i726_change_label

Conversation

@ABSitf
Copy link
Copy Markdown
Contributor

@ABSitf ABSitf commented Jul 15, 2022

added ChangeLabelAction for history

added ChangeLabelAction for history
Comment on lines +86 to +93
struct LabelNameMemory
{
std::string lastLabel;
std::string labelBuffer;
Vector3f textPos;
std::shared_ptr<ObjectLabel> obj{ nullptr };
bool changed{ false };
} oldLabelName_;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why save all, i think we need only label text, and why oldLabelName_ if it holds all info

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

textPos & changed removed
lastLabel need for history
obj need to check change object

Comment on lines +1172 to +1174
const auto positionedText = pObjLabel->getLabel();
oldLabelName_.lastLabel = positionedText.text;
oldLabelName_.labelBuffer = oldLabelName_.lastLabel;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not const auto& positionedText = pObjLabel->getLabel();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please rename field oldLabelName_ it is not name and does not affect lables name

@ABSitf ABSitf merged commit 441252c into master Jul 15, 2022
@ABSitf ABSitf deleted the i726_change_label branch July 15, 2022 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants