Skip to content

Commit 5530414

Browse files
committed
Updated WInPlaceEdit to properly use contained WLineEdit
placeholder functionality; removed superfluous placeholder member
1 parent bfcce9c commit 5530414

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/Wt/WInPlaceEdit.C

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,16 +103,14 @@ void WInPlaceEdit::setText(const WString& text)
103103

104104
void WInPlaceEdit::setPlaceholderText(const WString& text)
105105
{
106-
placeholderText_ = text;
107-
108106
edit_->setPlaceholderText(text);
109107
if (empty_)
110108
text_->setText(text);
111109
}
112110

113111
const WString& WInPlaceEdit::placeholderText() const
114112
{
115-
return placeholderText_;
113+
return edit_->placeholderText();
116114
}
117115

118116
void WInPlaceEdit::save()

src/Wt/WInPlaceEdit.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ class WT_API WInPlaceEdit : public WCompositeWidget
166166
WText *text_;
167167
WLineEdit *edit_;
168168
WPushButton *save_, *cancel_;
169-
WString placeholderText_;
170169
Wt::Signals::connection c2_;
171170
bool empty_;
172171
};

0 commit comments

Comments
 (0)