MCPcopy Create free account
hub / github.com/baldurk/renderdoc / currentChanged

Method currentChanged

qrenderdoc/Widgets/Extended/RDHeaderView.cpp:934–980  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

932}
933
934void RDHeaderView::currentChanged(const QModelIndex &current, const QModelIndex &old)
935{
936 if(!m_customSizing)
937 return QHeaderView::currentChanged(current, old);
938
939 // not optimal at all
940 if(current != old)
941 {
942 QRect r = viewport()->rect();
943
944 if(old.isValid())
945 {
946 QRect rect = r;
947
948 if(orientation() == Qt::Horizontal)
949 {
950 rect.setLeft(sectionViewportPosition(old.column()));
951 rect.setWidth(sectionSize(old.column()));
952 }
953 else
954 {
955 rect.setTop(sectionViewportPosition(old.column()));
956 rect.setHeight(sectionSize(old.column()));
957 }
958
959 viewport()->update(rect);
960 }
961
962 if(current.isValid())
963 {
964 QRect rect = r;
965
966 if(orientation() == Qt::Horizontal)
967 {
968 rect.setLeft(sectionViewportPosition(current.column()));
969 rect.setWidth(sectionSize(current.column()));
970 }
971 else
972 {
973 rect.setTop(sectionViewportPosition(current.column()));
974 rect.setHeight(sectionSize(current.column()));
975 }
976
977 viewport()->update(rect);
978 }
979 }
980}
981
982void RDHeaderView::updateGeometries()
983{

Callers

nothing calls this directly

Calls 8

orientationFunction · 0.85
setLeftMethod · 0.80
rectMethod · 0.45
isValidMethod · 0.45
columnMethod · 0.45
setWidthMethod · 0.45
setHeightMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected