mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-05 05:15:47 +00:00
When closing multiple capture connections apply 'No to All' answer wider
* This means if you're closing multiple connections and click 'no to all' when prompting save of instead of discarding just the captures in that connection then going on to prompt for the next, it discards all remaining captures.
This commit is contained in:
@@ -1951,6 +1951,8 @@ void MainWindow::setRemoteHost(int hostIdx)
|
||||
if(hostIdx >= 0 && hostIdx < hosts.count())
|
||||
host = hosts[hostIdx];
|
||||
|
||||
bool noToAll = false;
|
||||
|
||||
for(LiveCapture *live : m_LiveCaptures)
|
||||
{
|
||||
// allow live captures to this host to stay open, that way
|
||||
@@ -1959,7 +1961,12 @@ void MainWindow::setRemoteHost(int hostIdx)
|
||||
if(host.IsValid() && live->hostname() == host.Hostname())
|
||||
continue;
|
||||
|
||||
if(!live->checkAllowClose())
|
||||
// if the user previously selected 'no to all' in the save prompts below, apply that to all
|
||||
// subsequent live captures
|
||||
if(noToAll)
|
||||
continue;
|
||||
|
||||
if(!live->checkAllowClose(m_LiveCaptures.count() > 1, noToAll))
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2937,9 +2944,16 @@ void MainWindow::loadLayout_triggered()
|
||||
|
||||
void MainWindow::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
bool noToAll = false;
|
||||
|
||||
for(LiveCapture *live : m_LiveCaptures)
|
||||
{
|
||||
if(!live->checkAllowClose())
|
||||
// if the user previously selected 'no to all' in the save prompts below, apply that to all
|
||||
// subsequent live captures
|
||||
if(noToAll)
|
||||
continue;
|
||||
|
||||
if(!live->checkAllowClose(m_LiveCaptures.count() > 1, noToAll))
|
||||
{
|
||||
event->ignore();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user