-----------------------------------------------------------------------------
| 115 | |
| 116 | //----------------------------------------------------------------------------- |
| 117 | void pqPythonTabWidget::addNewTextArea(const QString& fileName, vtkTypeUInt32 location) |
| 118 | { |
| 119 | // If the fileName is empty abort |
| 120 | if (fileName.isEmpty()) |
| 121 | { |
| 122 | return; |
| 123 | } |
| 124 | |
| 125 | const int isOpened = this->fileIsOpened(fileName); |
| 126 | if (isOpened != -1) |
| 127 | { |
| 128 | this->setCurrentIndex(isOpened); |
| 129 | return; |
| 130 | } |
| 131 | |
| 132 | pqPythonTextArea* tArea = this->getCurrentTextArea(); |
| 133 | if (!tArea->isEmpty() || tArea->isLinked()) |
| 134 | { |
| 135 | this->createNewEmptyTab(); |
| 136 | tArea = this->getCurrentTextArea(); |
| 137 | } |
| 138 | |
| 139 | // If not create a new tab |
| 140 | tArea->openFile(fileName, location); |
| 141 | } |
| 142 | |
| 143 | //----------------------------------------------------------------------------- |
| 144 | void pqPythonTabWidget::loadFile(const QString& fileName) |
no test coverage detected