Commit ce75d71b authored by Victor Yacovlev's avatar Victor Yacovlev

Fixed Ctrl+A on output pane

parent 70a0dd15
...@@ -187,9 +187,12 @@ void OneSession::relayout(uint realWidth, size_t fromLine, bool headerAndFooter) ...@@ -187,9 +187,12 @@ void OneSession::relayout(uint realWidth, size_t fromLine, bool headerAndFooter)
// 2. Header // 2. Header
visibleHeader_ = headerText(); visibleHeader_ = headerText();
LineProp old = headerProp_;
headerProp_.clear(); headerProp_.clear();
for (size_t i=0; i<visibleHeader_.length(); i++) { for (size_t i=0; i<visibleHeader_.length(); i++) {
headerProp_.push_back(CS_Output); headerProp_.push_back(CS_Output);
if (i < old.size())
headerProp_[i] = old[i];
} }
headerRect_ = QRect(BodyPadding, headerRect_ = QRect(BodyPadding,
0, 0,
...@@ -198,9 +201,12 @@ void OneSession::relayout(uint realWidth, size_t fromLine, bool headerAndFooter) ...@@ -198,9 +201,12 @@ void OneSession::relayout(uint realWidth, size_t fromLine, bool headerAndFooter)
// 3. Footer // 3. Footer
visibleFooter_ = footerText(); visibleFooter_ = footerText();
old = footerProp_;
footerProp_.clear(); footerProp_.clear();
for (size_t i=0; i<visibleFooter_.length(); i++) { for (size_t i=0; i<visibleFooter_.length(); i++) {
footerProp_.push_back(CS_Output); footerProp_.push_back(CS_Output);
if (i < old.size())
footerProp_[i] = old[i];
} }
footerRect_ = footerText().isEmpty() footerRect_ = footerText().isEmpty()
? QRect(BodyPadding, ? QRect(BodyPadding,
...@@ -289,6 +295,7 @@ uint OneSession::drawUtilityText( ...@@ -289,6 +295,7 @@ uint OneSession::drawUtilityText(
p.setBrush(selectionBackroundBrush); p.setBrush(selectionBackroundBrush);
p.drawRect(xx, topLeft.y(), cw, height); p.drawRect(xx, topLeft.y(), cw, height);
p.setPen(selectedTextColor); p.setPen(selectedTextColor);
qDebug() << "UT has selection";
} }
else { else {
p.setPen(QColor(Qt::darkGray)); p.setPen(QColor(Qt::darkGray));
...@@ -398,6 +405,7 @@ uint OneSession::drawMainText(QPainter &p, const QPoint & topLeft, const QRect & ...@@ -398,6 +405,7 @@ uint OneSession::drawMainText(QPainter &p, const QPoint & topLeft, const QRect &
p.setPen(Qt::NoPen); p.setPen(Qt::NoPen);
p.setBrush(selectionBackroundBrush); p.setBrush(selectionBackroundBrush);
p.drawRect(xx, yy-atom.height(), atom.width(), atom.height()); p.drawRect(xx, yy-atom.height(), atom.width(), atom.height());
qDebug() << "MT has selection";
} }
if (spec & SelectionMask) if (spec & SelectionMask)
p.setPen(selectedTextColor); p.setPen(selectedTextColor);
...@@ -583,6 +591,7 @@ void OneSession::selectAll() ...@@ -583,6 +591,7 @@ void OneSession::selectAll()
} }
selectedLineEnds_[l] = true; selectedLineEnds_[l] = true;
} }
relayout(parent_->width() - 2 * SessionMargin, 0, true);
emit updateRequest(); emit updateRequest();
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment