+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
/*
* ModuleBase_PagedContainer.cpp
*
#include <QVBoxLayout>
-ModuleBase_PagedContainer::ModuleBase_PagedContainer(QWidget* theParent, const Config_WidgetAPI* theData,
- const std::string& theParentId)
-: ModuleBase_ModelWidget(theParent, theData, theParentId),
+ModuleBase_PagedContainer::ModuleBase_PagedContainer(QWidget* theParent,
+ const Config_WidgetAPI* theData)
+: ModuleBase_ModelWidget(theParent, theData),
myIsFocusOnCurrentPage(false)
{
// it is not obligatory to be ignored when property panel tries to activate next active widget
focusTo();
}
-bool ModuleBase_PagedContainer::storeValueCustom() const
+bool ModuleBase_PagedContainer::storeValueCustom()
{
// A rare case when plugin was not loaded.
if(!myFeature)
void ModuleBase_PagedContainer::onPageChanged()
{
- storeValue();
- if (myIsFocusOnCurrentPage) focusTo();
+ if (!storeValue())
+ return;
+ // focus might be changed only if the value is correcly stored
+ // if it is not stored, reentrant manager will handle by this widget
+ // after it will restart operation, the widget might be removed
+ if (myIsFocusOnCurrentPage)
+ focusTo();
}