Changeset View
Changeset View
Standalone View
Standalone View
document/kpDocument_Selection.cpp
Show First 20 Lines • Show All 78 Lines • ▼ Show 20 Line(s) | |||||
79 | #if DEBUG_KP_DOCUMENT && 1 | 79 | #if DEBUG_KP_DOCUMENT && 1 | ||
80 | qCDebug(kpLogDocument) << "kpDocument::setSelection() sel boundingRect=" | 80 | qCDebug(kpLogDocument) << "kpDocument::setSelection() sel boundingRect=" | ||
81 | << selection.boundingRect () | 81 | << selection.boundingRect () | ||
82 | << endl; | 82 | << endl; | ||
83 | #endif | 83 | #endif | ||
84 | 84 | | |||
85 | d->environ->setQueueViewUpdates (); | 85 | d->environ->setQueueViewUpdates (); | ||
86 | { | 86 | { | ||
87 | const bool hadSelection = (bool) m_selection; | 87 | const bool hadSelection = static_cast<bool> (m_selection); | ||
88 | kpAbstractSelection *oldSelection = m_selection; | 88 | kpAbstractSelection *oldSelection = m_selection; | ||
89 | 89 | | |||
90 | 90 | | |||
91 | // (must be called before giving the document a new selection, to | 91 | // (must be called before giving the document a new selection, to | ||
92 | // avoid a potential mess where switchToCompatibleTool() ends | 92 | // avoid a potential mess where switchToCompatibleTool() ends | ||
93 | // the current selection tool, killing the new selection) | 93 | // the current selection tool, killing the new selection) | ||
94 | bool isTextChanged = false; | 94 | bool isTextChanged = false; | ||
95 | d->environ->switchToCompatibleTool (selection, &isTextChanged); | 95 | d->environ->switchToCompatibleTool (selection, &isTextChanged); | ||
▲ Show 20 Lines • Show All 245 Lines • Show Last 20 Lines |