Skip to content

Commit

Permalink
Ensure Standard editor default tab in Expression Window. (#19229) (#1…
Browse files Browse the repository at this point in the history
…9230)

Resolves #19217
  • Loading branch information
biagas committed Jan 12, 2024
1 parent 7af89a5 commit 56aa0fe
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/gui/QvisExpressionsWindow.C
Original file line number Diff line number Diff line change
Expand Up @@ -648,8 +648,7 @@ QvisExpressionsWindow::CreateWindowContents()
// tab 2 -> python filter editor
CreatePythonFilterEditor();
editorTabs->addTab(pyEditorWidget, tr("Python expression editor"));


editorTabs->setCurrentIndex(0);
definitionLayout->addWidget(editorTabs,row,0,1,2);
definitionLayout->setColumnStretch(1, 10);

Expand Down Expand Up @@ -966,6 +965,13 @@ QvisExpressionsWindow::UpdateWindowSingleItem()
// Added a call to update() to remove the visual artificats present during
// the first draw of the expressions window.
//
// Kathleen Biagas, Thu Jan 11, 2024
// Fixed problem with stdEditor not being the default open tab when
// Expression window first opened. Calling setEnabled with a value of
// on the tabs widget seems to be changing which tab is considered current.
// Capture currentIndex before setting enablement of the tabs, then reset
// it afterwards.
//
// ****************************************************************************

void
Expand All @@ -990,8 +996,12 @@ QvisExpressionsWindow::UpdateWindowSensitivity()
typeList->setEnabled(enable);
notHidden->setEnabled(enable);

// calling setTableEnbled with a value of false seems to change the
// current index, so capture that information and reset it after.
int ci = editorTabs->currentIndex();
editorTabs->setTabEnabled(0, enable && stdExprActive);
editorTabs->setTabEnabled(1, enable && pyExprActive);
editorTabs->setCurrentIndex(ci);
editorTabs->update();

this->update();
Expand Down
1 change: 1 addition & 0 deletions src/resources/help/en_US/relnotes3.4.1.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<li>Fixed compile error where some executable targets were missing QSurfaceFormat include.</li>
<li>Fixed a Volume plot but that would cause the parallel engine to crash when certain operators were used in conjunction with the plot.</li>
<li>Fixed a Cube reader bug that didn't read in multiple orbital data files correctly.</li>
<li>Fixed a bug with the Expression window that caused the 'Python' editor to be the default tab when the window was first opened.</li>
</ul>

<a name="Enhancements"></a>
Expand Down

0 comments on commit 56aa0fe

Please sign in to comment.