MCPcopy Create free account
hub / github.com/Kitware/ParaView / updateActions

Method updateActions

Qt/Python/pqPythonTabWidget.cxx:82–108  ·  view source on GitHub ↗

-----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

80
81//-----------------------------------------------------------------------------
82void pqPythonTabWidget::updateActions(pqPythonEditorActions& actions)
83{
84 const int lastIdx = this->indexOf(this->lastFocus);
85 const int currentIdx = this->currentIndex();
86
87 if (currentIdx == this->count() - 1)
88 {
89 if (lastIdx == -1)
90 {
91 this->setCurrentIndex(0);
92 }
93 else
94 {
95 this->setCurrentIndex(lastIdx);
96 }
97
98 return;
99 }
100
101 if (this->lastFocus)
102 {
103 this->lastFocus->disconnectActions(actions);
104 }
105
106 this->lastFocus = this->getCurrentTextArea();
107 this->lastFocus->connectActions(actions);
108}
109
110//-----------------------------------------------------------------------------
111pqPythonTextArea* pqPythonTabWidget::getCurrentTextArea() const

Callers 1

pqPythonScriptEditorMethod · 0.45

Calls 7

getCurrentTextAreaMethod · 0.95
disconnectActionsMethod · 0.80
indexOfMethod · 0.45
currentIndexMethod · 0.45
countMethod · 0.45
setCurrentIndexMethod · 0.45
connectActionsMethod · 0.45

Tested by

no test coverage detected