Skip to content

Commit

Permalink
Show predefined Move to tab actions only if the tab is not the same
Browse files Browse the repository at this point in the history
Fixes #2669
  • Loading branch information
hluk committed Apr 21, 2024
1 parent 901934a commit b842ef2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ bool matchData(const QRegularExpression &re, const QVariantMap &data, const QStr
bool canExecuteCommand(const Command &command, const QVariantMap &data, const QString &sourceTabName)
{
// Verify that an action is provided.
if ( command.cmd.isEmpty() && !command.remove
if ( command.cmd.isEmpty()
&& (command.tab.isEmpty() || command.tab == sourceTabName) )
{
return false;
Expand Down Expand Up @@ -1142,7 +1142,7 @@ void MainWindow::onItemCommandActionTriggered(CommandAction *commandAction, cons
}
}

if (command.remove)
if ( command.remove && (command.tab.isEmpty() || command.tab != c->tabName()) )
c->removeIndexes(selected);

if (command.hideWindow)
Expand Down

0 comments on commit b842ef2

Please sign in to comment.