[education/rkward] /: Fix requiredness of elements in a hidden <row>
Thomas Friedrichsmeier
null at kde.org
Mon May 9 21:03:23 BST 2022
Git commit f1cadd391370503ebfa30b777790849544d22621 by Thomas Friedrichsmeier.
Committed on 06/05/2022 at 15:33.
Pushed by tfry into branch 'master'.
Fix requiredness of elements in a hidden <row>
M +1 -0 ChangeLog
M +3 -3 rkward/plugin/rkcomponent.cpp
https://invent.kde.org/education/rkward/commit/f1cadd391370503ebfa30b777790849544d22621
diff --git a/ChangeLog b/ChangeLog
index 6c631c94..290f858d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
TODOs:
- More tolerant handshake on Windows? Simply a matter of allowing more time?
+- Fixed: Disabling a <row> element in plugins would not make the sub-elements non-required
- Add option to show ANOVA table for linear regression
- Add default preview() function is available to plugins, reducing the code needed to add preview functionality
- Add preview functionality to most existing plugins that did not have it, yet
diff --git a/rkward/plugin/rkcomponent.cpp b/rkward/plugin/rkcomponent.cpp
index cc841aa2..2fdfb94e 100644
--- a/rkward/plugin/rkcomponent.cpp
+++ b/rkward/plugin/rkcomponent.cpp
@@ -247,13 +247,13 @@ RKComponentBase::ComponentStatus RKComponentBase::recursiveStatus () {
if (isComponent () && static_cast<RKComponent*>(this)->isInactive ()) req = false;
if (!req) return Satisfied;
if (children_satisfied && isValid ()) return Satisfied;
- if (isComponent ()) RK_DEBUG (PLUGIN, DL_DEBUG, "component not satisfied: %s", qPrintable (static_cast<RKComponent*> (this)->getIdInParent ()));
+ if (isComponent ()) RK_DEBUG (PLUGIN, DL_DEBUG, "component not satisfied: %s (type %d)", qPrintable (static_cast<RKComponent*> (this)->getIdInParent ()), type());
return Unsatisfied;
}
//############### RKComponent ########################
-RKComponent::RKComponent (RKComponent *parent_component, QWidget *parent_widget) : QWidget (parent_widget) {
+RKComponent::RKComponent(RKComponent *parent_component, QWidget *parent_widget) : QWidget(parent_widget), RKComponentBase() {
RK_TRACE (PLUGIN);
createDefaultProperties ();
@@ -324,7 +324,7 @@ void RKComponent::updateEnablednessRecursive (bool parent_enabled) {
bool RKComponent::isInactive () {
if (!isEnabled ()) return true;
- if (parentWidget () && isHidden ()) return true; // Note: Components embedded as button may be "hidden" without being unaccessible
+ if (parentWidget() && !isVisible()) return true; // Note: Components embedded as button may be "hidden" without being unaccessible
if (!visibility_property->boolValue ()) return true; // Note for those, this is the appropriate check
return false;
}
More information about the rkward-tracker
mailing list