myState(Stored),
myIsValueStateBlocked(false)
{
+ myIsInternal = theData->getBooleanAttribute(ATTR_INTERNAL, false);
+
myDefaultValue = theData->getProperty(ATTR_DEFAULT);
myUseReset = theData->getBooleanAttribute(ATTR_USE_RESET, true);
myIsComputedDefault = theData->getProperty(ATTR_DEFAULT) == DOUBLE_WDG_DEFAULT_COMPUTED;
/// \return the boolean result
std::string getDefaultValue() const { return myDefaultValue; }
+ /// Returns true, if widget is internal
+ /// \return the boolean result
+ bool isInternal() const { return myIsInternal; }
+
/// Returns true, if the obligatory value of the widget is not defined in the XML or has true value
/// \return the boolean result
bool isObligatory() const { return myIsObligatory; }
/// the default value, which is defined in the XML for this attribute
std::string myDefaultValue;
+ /// an XML internal state
+ bool myIsInternal;
+
/// the reset state. If it is false, the reset method of the widget is not performed
bool myUseReset;
/// blocked flag of modification of the value state
const std::string& theParentId)
: PartSet_WidgetPoint2D(theParent, theWorkshop, theData, theParentId)
{
- myIsInternal = theData->getBooleanAttribute(ATTR_INTERNAL, false);
}
bool PartSet_WidgetPoint2DFlyout::focusTo()
{
bool aCanAcceptFocus = true;
- if (myIsInternal && isComputedDefault()) {
+ if (isInternal() && isComputedDefault()) {
AISObjectPtr anObject = workshop()->displayer()->getAISObject(feature());
aCanAcceptFocus = anObject.get() && !anObject->isEmptyDistanceGeometry();
}
private:
//! Returns workshop
XGUI_Workshop* workshop() const;
-
-private:
- bool myIsInternal; /// an XML internal state
};
#endif
if (!aValidators->isCase(aCurrentWidget->feature(), aCurrentWidget->attributeID()))
continue; // this attribute is not participated in the current case
- if (isCheckVisibility) {
+ if (isCheckVisibility && !aCurrentWidget->isInternal()) {
if (!aCurrentWidget->isVisible())
continue;
}