# HG changeset patch # User Chris Cannam # Date 1558018211 -3600 # Node ID 009f22e03bf6b4cb6eade4a11b2b6eb0acb9e6f3 # Parent 160e6d0101415de369128c100516ce3e76aac223 Make it possible to disable cancel buttons diff -r 160e6d010141 -r 009f22e03bf6 view/View.cpp --- a/view/View.cpp Thu May 16 15:50:02 2019 +0100 +++ b/view/View.cpp Thu May 16 15:50:11 2019 +0100 @@ -1745,6 +1745,11 @@ return; } + QSettings settings; + settings.beginGroup("View"); + bool showCancelButton = settings.value("showcancelbuttons", true).toBool(); + settings.endGroup(); + int ph = height(); bool found = false; @@ -1833,13 +1838,23 @@ timer->start(); } - int scaled20 = scalePixelSize(20); - - cancel->move(0, ph - pb->height()/2 - scaled20/2); - cancel->show(); - - pb->setValue(completion); - pb->move(scaled20, ph - pb->height()); + if (showCancelButton) { + + int scaled20 = scalePixelSize(20); + + cancel->move(0, ph - pb->height()/2 - scaled20/2); + cancel->show(); + + pb->setValue(completion); + pb->move(scaled20, ph - pb->height()); + + } else { + + cancel->hide(); + + pb->setValue(completion); + pb->move(0, ph - pb->height()); + } pb->show(); pb->update();