Actions
Bug #7447
closedWAnchor::setTextFormat can be reset
Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
02/07/2020
Due date:
% Done:
0%
Estimated time:
Description
Hello,
I have the following:
Wt::WAnchor* anchor;
...
anchor->setTextFormat(Wt::TextFormat::Plain);
...
anchor->setText("Something"); // OK here
anchor->setLink(...);
assert(anchor->textFormat == Wt::TextFormat::Plain); // -> ok
Later:
achor->setText("");
anchor->setLink({});
assert(anchor->textFormat == Wt::TextFormat::Plain); // -> fails
To be sure, I have to call the setTextFormat each time I set a non empty text, which is questionable.
Updated by Roel Standaert over 4 years ago
Ah I see, it is implemented using a WText
(which also contains the text format), and the WText
is removed if the text is set to empty.
Updated by Roel Standaert over 4 years ago
- Status changed from New to Resolved
I don't see a reason why it would have to delete the underlying WText
, and neither does Koen, so I guess we'll just keep that underlying WText
around. I pushed a fix.
Updated by Roel Standaert about 4 years ago
- Status changed from Resolved to Closed
Actions