Beep6581 / RawTherapee

A powerful cross-platform raw photo processing program
https://rawtherapee.com
GNU General Public License v3.0
2.89k stars 323 forks source link

Wavelet tool does not remember the status of its subtools #3968

Closed heckflosse closed 7 years ago

heckflosse commented 7 years ago

To reproduce: Start rt open image go to wavelet tool and expand it (in case it's not yet expanded) collapse all sub tools of wavelet except one close rt start rt open image got to wavelet tool bug: all subtools are expanded again

Fixed with this small patch:

diff --git a/rtgui/retinex.cc b/rtgui/retinex.cc
index 6da77f8e..bf88a85e 100644
--- a/rtgui/retinex.cc
+++ b/rtgui/retinex.cc
@@ -657,7 +657,7 @@ void Retinex::writeOptions (std::vector<int> &tpOpen)

 void Retinex::updateToolState (std::vector<int> &tpOpen)
 {
-    if (tpOpen.size() == 10) {
+    if (tpOpen.size() >= 10) {
         expsettings->set_expanded (tpOpen.at (9));
     }
 }
diff --git a/rtgui/wavelet.cc b/rtgui/wavelet.cc
index 1fea0cd5..b61c9acd 100644
--- a/rtgui/wavelet.cc
+++ b/rtgui/wavelet.cc
@@ -3040,7 +3040,7 @@ void Wavelet::writeOptions(std::vector<int> &tpOpen)

 void Wavelet::updateToolState(std::vector<int> &tpOpen)
 {
-    if(tpOpen.size() == 9) {
+    if(tpOpen.size() >= 9) {
         expsettings->set_expanded(tpOpen.at(0));
         expcontrast->set_expanded(tpOpen.at(1));
         expchroma->set_expanded(tpOpen.at(2));
Beep6581 commented 7 years ago

I have not tried the patch yet and won't be able to tonight, but I'm happy to see it! I tried once (and failed) to make all Wavelet sub-tools collapsed by default - would be cool if that was the case.

heckflosse commented 7 years ago

@Beep6581 Should be fixed with this patch. As it's a save patch I will push it now.