[bookmarks] Remove duplicated parameters.

This commit is contained in:
vng 2013-02-18 19:21:56 +03:00 committed by Alex Zolotarev
parent 4acc78d4be
commit d5b4b40123
4 changed files with 10 additions and 16 deletions

View file

@ -24,9 +24,7 @@ namespace gui
Balloon::Balloon(Params const & p)
: Element(p),
m_boundRects(1),
m_text(p.m_text),
m_image(p.m_image)
m_boundRects(1)
{
m_textMarginLeft = p.m_textMarginLeft;
m_textMarginRight = p.m_textMarginRight;
@ -40,7 +38,7 @@ namespace gui
TextView::Params tp;
tp.m_text = m_text;
tp.m_text = p.m_text;
tp.m_position = graphics::EPosRight;
tp.m_pivot = m2::PointD(0, 0);
tp.m_depth = depth() + 1;
@ -54,7 +52,7 @@ namespace gui
ip.m_pivot = m2::PointD(0, 0);
ip.m_position = graphics::EPosRight;
ip.m_depth = depth() + 1;
ip.m_image = m_image;
ip.m_image = p.m_image;
m_imageView.reset(new ImageView(ip));

View file

@ -22,7 +22,12 @@ namespace gui
{
class Balloon : public Element
{
protected:
scoped_ptr<TextView> m_textView;
private:
scoped_ptr<ImageView> m_imageView;
scoped_ptr<graphics::DisplayList> m_displayList;
typedef function<void (Element *)> TOnClickListener;
@ -32,13 +37,6 @@ namespace gui
void purge();
void layout();
scoped_ptr<TextView> m_textView;
scoped_ptr<ImageView> m_imageView;
scoped_ptr<graphics::DisplayList> m_displayList;
string m_text;
graphics::Image::Info m_image;
double m_textMarginLeft;
double m_textMarginTop;
double m_textMarginRight;

View file

@ -32,11 +32,10 @@ m2::PointD const BookmarkBalloon::glbPivot()
void BookmarkBalloon::setBookmarkName(string const & name)
{
m_bookmarkName = name;
setText(name);//.substr(0, 13));
setText(name);
}
string const & BookmarkBalloon::bookmarkName()
{
return m_bookmarkName;
return m_textView->text();
}

View file

@ -12,7 +12,6 @@ private:
m2::PointD m_glbPivot;
Framework const * m_framework;
string m_bookmarkName;
void update();