Skip to content

Commit 742d058

Browse files
committed
scripting: fix ui menu line for scripting
Signed-off-by: IonutMuthi <ionut.muthi@analog.com>
1 parent bf973b8 commit 742d058

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

core/src/browsemenu.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,15 @@ BrowseMenu::BrowseMenu(QWidget *parent)
8585

8686
m_scriptingBtn->installEventFilter(this);
8787

88+
auto scriptingMenuLine = createHLine(m_content);
89+
8890
// Connect to preference changes for scripting button
8991
Preferences *prefs = Preferences::GetInstance();
9092
connect(prefs, &Preferences::preferenceChanged, this, [=](QString key, QVariant val) {
9193
if(key == "general_scripting_enabled") {
9294
bool enabled = val.toBool();
9395
m_scriptingBtn->setVisible(enabled);
96+
scriptingMenuLine->setVisible(enabled);
9497
}
9598
});
9699

@@ -154,7 +157,7 @@ BrowseMenu::BrowseMenu(QWidget *parent)
154157

155158
add(createHLine(m_content), "toolMenuLine2", MA_BOTTOMLAST);
156159
add(m_scriptingBtn, "scriptingBtn", MA_BOTTOMLAST);
157-
add(createHLine(m_content), "toolMenuLine3", MA_BOTTOMLAST);
160+
add(scriptingMenuLine, "toolMenuLine3", MA_BOTTOMLAST);
158161
add(saveLoadWidget, "saveLoad", MA_BOTTOMLAST);
159162
add(pkgBtn, "pkgBtn", MA_BOTTOMLAST);
160163
add(preferencesBtn, "preferencesBtn", MA_BOTTOMLAST);

0 commit comments

Comments
 (0)