Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Coincidence to rectangle macro feature: 1. Get point of sub-feature to set coincidenc...
[modules/shaper.git]
/
src
/
ModuleBase
/
ModuleBase_PagedContainer.cpp
diff --git
a/src/ModuleBase/ModuleBase_PagedContainer.cpp
b/src/ModuleBase/ModuleBase_PagedContainer.cpp
index d067e100c6132365785787373c2bdb665079a8c7..9f32442a577901139b5a810492c2828dc1195cd1 100644
(file)
--- a/
src/ModuleBase/ModuleBase_PagedContainer.cpp
+++ b/
src/ModuleBase/ModuleBase_PagedContainer.cpp
@@
-13,7
+13,7
@@
#include <ModelAPI_AttributeString.h>
#include <QWidget>
#include <ModelAPI_AttributeString.h>
#include <QWidget>
-#include <Q
l
ist>
+#include <Q
L
ist>
#include <QVBoxLayout>
#include <QVBoxLayout>
@@
-22,6
+22,9
@@
ModuleBase_PagedContainer::ModuleBase_PagedContainer(QWidget* theParent, const C
: ModuleBase_ModelWidget(theParent, theData, theParentId),
myIsFocusOnCurrentPage(false)
{
: ModuleBase_ModelWidget(theParent, theData, theParentId),
myIsFocusOnCurrentPage(false)
{
+ // it is not obligatory to be ignored when property panel tries to activate next active widget
+ // but if focus is moved to this control, it can accept it.
+ myIsObligatory = false;
}
ModuleBase_PagedContainer::~ModuleBase_PagedContainer()
}
ModuleBase_PagedContainer::~ModuleBase_PagedContainer()
@@
-29,10
+32,15
@@
ModuleBase_PagedContainer::~ModuleBase_PagedContainer()
}
int ModuleBase_PagedContainer::addPage(ModuleBase_PageBase* thePage,
}
int ModuleBase_PagedContainer::addPage(ModuleBase_PageBase* thePage,
- const QString& theName, const QString& theCaseId)
+ const QString& theName, const QString& theCaseId,
+ const QPixmap& theIcon )
{
{
+ if (!myPages.count()) {
+ setDefaultValue(theCaseId.toStdString());
+ }
myCaseIds << theCaseId;
myPages << thePage;
myCaseIds << theCaseId;
myPages << thePage;
+
return myPages.count();
}
return myPages.count();
}
@@
-65,7
+73,7
@@
void ModuleBase_PagedContainer::enableFocusProcessing()
myIsFocusOnCurrentPage = true;
}
myIsFocusOnCurrentPage = true;
}
-bool ModuleBase_PagedContainer::restoreValue()
+bool ModuleBase_PagedContainer::restoreValue
Custom
()
{
// A rare case when plugin was not loaded.
if(!myFeature)
{
// A rare case when plugin was not loaded.
if(!myFeature)
@@
-95,6
+103,7
@@
bool ModuleBase_PagedContainer::storeValueCustom() const
AttributeStringPtr aStringAttr = aData->string(attributeID());
QString aWidgetValue = myCaseIds.at(currentPageIndex());
aStringAttr->setValue(aWidgetValue.toStdString());
AttributeStringPtr aStringAttr = aData->string(attributeID());
QString aWidgetValue = myCaseIds.at(currentPageIndex());
aStringAttr->setValue(aWidgetValue.toStdString());
+ updateObject(myFeature); // for preview
return true;
}
return true;
}