Il 31/07/2011 11:19, Pavel Sanda ha scritto:
whats your qt version? i already tested its gray even in 1.6.1-10.  unless
my memory play nasty games with me, this really worked - i was able to set
size of external images.. what remains is that something in qt changed.

Btw, the attached patch brings that tab back to life for me.

Can I commit ?

    T.
Index: src/frontends/qt4/GuiExternal.cpp
===================================================================
--- src/frontends/qt4/GuiExternal.cpp	(revisione 39394)
+++ src/frontends/qt4/GuiExternal.cpp	(copia locale)
@@ -32,6 +32,7 @@
 #include "support/lstrings.h"
 #include "support/lyxlib.h"
 #include "support/os.h"
+#include "support/debug.h"
 
 #include "LengthCombo.h"
 #include "qt_helpers.h"
@@ -512,25 +513,25 @@
 	TransformIDs::const_iterator tr_begin = transformIds.begin();
 	TransformIDs::const_iterator const tr_end = transformIds.end();
 
-	bool found = std::find(tr_begin, tr_end, external::Rotate) != tr_end;
-	rotationGB->setEnabled(found);
+	bool rotate = std::find(tr_begin, tr_end, external::Rotate) != tr_end;
+	rotationGB->setEnabled(rotate);
 
-	found = std::find(tr_begin, tr_end, external::Resize) != tr_end;
-	scaleGB->setEnabled(found);
+	bool resize = std::find(tr_begin, tr_end, external::Resize) != tr_end;
+	scaleGB->setEnabled(resize);
 
-	found = std::find(tr_begin, tr_end, external::Clip) != tr_end;
-	cropGB->setEnabled(found);
+	bool clip = std::find(tr_begin, tr_end, external::Clip) != tr_end;
+	cropGB->setEnabled(clip);
 
-	tab->setTabEnabled(tab->indexOf(sizetab),
-		rotationGB->isEnabled()
-		|| scaleGB->isEnabled()
-		|| cropGB->isEnabled());
+	sizetab->setEnabled(rotate || resize || clip);
+	tab->setTabEnabled(tab->indexOf(sizetab), rotate || resize || clip);
 
-	found = std::find(tr_begin, tr_end, external::Extra) != tr_end;
+	bool found = std::find(tr_begin, tr_end, external::Extra) != tr_end;
+	LYXERR(Debug::GUI, "Extra found = " << found);
 	optionsGB->setEnabled(found);
 
 	bool scaled = displayGB->isChecked() && displayGB->isEnabled() &&
 			!isBufferReadonly() && (templ.preview_mode != PREVIEW_INSTANT);
+	LYXERR(Debug::GUI, "Scaled found = " << found);
 	displayscaleED->setEnabled(scaled);
 	scaleLA->setEnabled(scaled);
 

Reply via email to