Changeset View
Changeset View
Standalone View
Standalone View
src/view/kateviewinternal.cpp
Show First 20 Lines • Show All 91 Lines • ▼ Show 20 Line(s) | 611 | if (!isVisible() && !viewLinesScrolled && !changed) { | |||
---|---|---|---|---|---|
612 | return; //When this view is not visible, don't do anything | 612 | return; //When this view is not visible, don't do anything | ||
613 | } | 613 | } | ||
614 | 614 | | |||
615 | bool blocked = m_lineScroll->blockSignals(true); | 615 | bool blocked = m_lineScroll->blockSignals(true); | ||
616 | 616 | | |||
617 | int wrapWidth = width(); | 617 | int wrapWidth = width(); | ||
618 | if (view()->config()->dynWrapAtStaticMarker() && view()->config()->dynWordWrap()) { | 618 | if (view()->config()->dynWrapAtStaticMarker() && view()->config()->dynWordWrap()) { | ||
619 | // We need to transform char count to a pixel width, stolen from PrintPainter::updateCache() | 619 | // We need to transform char count to a pixel width, stolen from PrintPainter::updateCache() | ||
620 | QString s; s.fill(QLatin1Char('5'), view()->doc()->config()->wordWrapAt()); | 620 | QString s; s.fill(QLatin1Char('5'), view()->doc()->config()->intVal("Word Wrap Column")); | ||
621 | wrapWidth = qMin(width(), static_cast<int>(renderer()->currentFontMetrics().width(s))); | 621 | wrapWidth = qMin(width(), static_cast<int>(renderer()->currentFontMetrics().width(s))); | ||
622 | } | 622 | } | ||
623 | 623 | | |||
624 | if (wrapWidth != cache()->viewWidth()) { | 624 | if (wrapWidth != cache()->viewWidth()) { | ||
625 | cache()->setViewWidth(wrapWidth); | 625 | cache()->setViewWidth(wrapWidth); | ||
626 | changed = true; | 626 | changed = true; | ||
627 | } | 627 | } | ||
628 | 628 | | |||
▲ Show 20 Lines • Show All 91 Lines • Show Last 20 Lines |