equal
deleted
inserted
replaced
28 |
28 |
29 /*! |
29 /*! |
30 Constructor |
30 Constructor |
31 */ |
31 */ |
32 NmEditorTextEdit::NmEditorTextEdit(QGraphicsItem *parent) : |
32 NmEditorTextEdit::NmEditorTextEdit(QGraphicsItem *parent) : |
33 HbTextEdit(parent) |
33 HbTextEdit(parent), |
|
34 mFirstTimeToScrollPosUpdate(true) |
34 { |
35 { |
35 } |
36 } |
36 |
37 |
37 /*! |
38 /*! |
38 Destructor |
39 Destructor |
149 /*! |
150 /*! |
150 This slot is called when background scroll areas scroll position has been shanged. |
151 This slot is called when background scroll areas scroll position has been shanged. |
151 */ |
152 */ |
152 void NmEditorTextEdit::updateScrollPosition(const QPointF &newPosition) |
153 void NmEditorTextEdit::updateScrollPosition(const QPointF &newPosition) |
153 { |
154 { |
|
155 // Temporary fix: When this is called for the first time, the editor is scrolled down for |
|
156 // some reason so this will restore the scroll position. |
|
157 if(mFirstTimeToScrollPosUpdate) { |
|
158 mFirstTimeToScrollPosUpdate = false; |
|
159 mBackgroundScrollArea->scrollContentsTo(QPointF(0,0)); |
|
160 } |
154 mBgScrollPosition = newPosition; |
161 mBgScrollPosition = newPosition; |
155 } |
162 } |
156 |
163 |
157 /*! |
164 /*! |
158 This slot applies custom text color for user - entered text |
165 This slot applies custom text color for user - entered text |