From eeb2a8192ad68f0170ee6e6e24b5e7c6d4164958 Mon Sep 17 00:00:00 2001 From: Krisjanis Rijnieks Date: Mon, 18 Apr 2016 18:40:27 +0200 Subject: [PATCH] Fix not being able to `TAB` change sources Ref #55 It was not possible to change a source using `TAB` just after a new surface creation while it had the default checker source set. --- src/Commands/SetNextSourceCmd.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Commands/SetNextSourceCmd.cpp b/src/Commands/SetNextSourceCmd.cpp index 7e7dfac..cba9e19 100644 --- a/src/Commands/SetNextSourceCmd.cpp +++ b/src/Commands/SetNextSourceCmd.cpp @@ -60,7 +60,11 @@ void SetNextSourceCmd::exec(){ } if(_sourceIndex == -1){ - return; + if(_sources.size()){ + _nextSourceIndex = 0; + }else{ + return; + } } _nextSourceIndex = _sourceIndex + 1;