[vlc-commits] Qt: Apply nothing if no change was made in toolbar custom

Benoit du Payrat git at videolan.org
Tue Apr 12 17:42:32 CEST 2016


vlc | branch: master | Benoit du Payrat <benoit at videolabs.io> | Mon Apr 11 18:35:19 2016 +0200| [f6b29308ec1d29a963aa5acc7d806bce52e25cc3] | committer: Hugo Beauzée-Luyssen

Qt: Apply nothing if no change was made in toolbar custom

Fix #15011

Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f6b29308ec1d29a963aa5acc7d806bce52e25cc3
---

 modules/gui/qt/dialogs/toolbar.cpp |   18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/modules/gui/qt/dialogs/toolbar.cpp b/modules/gui/qt/dialogs/toolbar.cpp
index 4de1040..4569a39 100644
--- a/modules/gui/qt/dialogs/toolbar.cpp
+++ b/modules/gui/qt/dialogs/toolbar.cpp
@@ -257,6 +257,24 @@ void ToolbarEditDialog::changeProfile( int i )
 
 void ToolbarEditDialog::close()
 {
+    bool isChecked = getSettings()->value( "MainWindow/ToolbarPos" ).toBool();
+    QString c1 = getSettings()->value( "MainWindow/MainToolbar1" ).toString();
+    QString c2 = getSettings()->value( "MainWindow/MainToolbar2" ).toString();
+    QString cA = getSettings()->value( "MainWindow/AdvToolbar" ).toString();
+    QString c = getSettings()->value( "MainWindow/InputToolbar" ).toString();
+    QString cFSC = getSettings()->value( "MainWindow/FSCToolbar" ).toString();
+
+    if ( isChecked == positionCheckbox->isChecked()
+	 && c1 == controller1->getValue()
+	 && c2 == controller2->getValue()
+	 && cA == controllerA->getValue()
+	 && c == controller->getValue()
+	 && cFSC == controllerFSC->getValue() )
+    {
+	reject();
+	return;
+    }
+
     getSettings()->setValue( "MainWindow/ToolbarPos", !!positionCheckbox->isChecked() );
     getSettings()->setValue( "MainWindow/MainToolbar1", controller1->getValue() );
     getSettings()->setValue( "MainWindow/MainToolbar2", controller2->getValue() );



More information about the vlc-commits mailing list