Changeset View
Changeset View
Standalone View
Standalone View
krusader/DiskUsage/radialMap/labels.cpp
Show First 20 Lines • Show All 105 Lines • ▼ Show 20 Line(s) | 100 | { | |||
---|---|---|---|---|---|
106 | 106 | | |||
107 | //1. Create list of labels sorted in the order they will be rendered | 107 | //1. Create list of labels sorted in the order they will be rendered | ||
108 | 108 | | |||
109 | if (m_focus != nullptr && m_focus->file() != m_tree) { //separate behavior for selected vs unselected segments | 109 | if (m_focus != nullptr && m_focus->file() != m_tree) { //separate behavior for selected vs unselected segments | ||
110 | //don't bother with files | 110 | //don't bother with files | ||
111 | if (m_focus->file() == nullptr || !m_focus->file()->isDir()) return; | 111 | if (m_focus->file() == nullptr || !m_focus->file()->isDir()) return; | ||
112 | 112 | | |||
113 | //find the range of levels we will be potentially drawing labels for | 113 | //find the range of levels we will be potentially drawing labels for | ||
114 | for (const auto *p = (const Directory *)m_focus->file(); | 114 | for (const auto *p = dynamic_cast<const Directory *>(m_focus->file()); | ||
115 | p != m_tree; | 115 | p != m_tree; | ||
116 | ++startLevel) { //startLevel is the level above whatever m_focus is in | 116 | ++startLevel) { //startLevel is the level above whatever m_focus is in | ||
117 | p = p->parent(); | 117 | p = p->parent(); | ||
118 | } | 118 | } | ||
119 | 119 | | |||
120 | //range=2 means 2 levels to draw labels for | 120 | //range=2 means 2 levels to draw labels for | ||
121 | 121 | | |||
122 | unsigned int a1, a2, minAngle; | 122 | unsigned int a1, a2, minAngle; | ||
▲ Show 20 Lines • Show All 245 Lines • Show Last 20 Lines |