From f6d6c62fab7766595ecdf2e0381015f6e1c712b1 Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Tue, 21 Mar 2017 15:15:15 -0700 Subject: [PATCH] move variable closer to context where it is used --- libraries/ui/src/ui/Menu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/ui/src/ui/Menu.cpp b/libraries/ui/src/ui/Menu.cpp index a793942056..50833e90fc 100644 --- a/libraries/ui/src/ui/Menu.cpp +++ b/libraries/ui/src/ui/Menu.cpp @@ -471,10 +471,10 @@ void Menu::removeSeparator(const QString& menuName, const QString& separatorName int textAt = findPositionOfMenuItem(menu, separatorName); QList menuActions = menu->actions(); if (textAt > 0 && textAt < menuActions.size()) { - QAction* separatorText = menuActions[textAt]; QAction* separatorLine = menuActions[textAt - 1]; if (separatorLine) { if (separatorLine->isSeparator()) { + QAction* separatorText = menuActions[textAt]; menu->removeAction(separatorText); menu->removeAction(separatorLine); separatorRemoved = true;