Skip to content

Commit

Permalink
Updated WInPlaceEdit to properly use contained WLineEdit
Browse files Browse the repository at this point in the history
placeholder functionality; removed superfluous placeholder member
  • Loading branch information
skoehler47 committed Mar 22, 2023
1 parent bfcce9c commit 5530414
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 1 addition & 3 deletions src/Wt/WInPlaceEdit.C
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,14 @@ void WInPlaceEdit::setText(const WString& text)

void WInPlaceEdit::setPlaceholderText(const WString& text)
{
placeholderText_ = text;

edit_->setPlaceholderText(text);
if (empty_)
text_->setText(text);
}

const WString& WInPlaceEdit::placeholderText() const
{
return placeholderText_;
return edit_->placeholderText();
}

void WInPlaceEdit::save()
Expand Down
1 change: 0 additions & 1 deletion src/Wt/WInPlaceEdit.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ class WT_API WInPlaceEdit : public WCompositeWidget
WText *text_;
WLineEdit *edit_;
WPushButton *save_, *cancel_;
WString placeholderText_;
Wt::Signals::connection c2_;
bool empty_;
};
Expand Down

0 comments on commit 5530414

Please sign in to comment.