mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0029674: Improvements in Inspector tool
- preferences for dock windows geometry, tree view columns and current view projection; - ViewControl package for common functionality between plugins; - processing Location and Orientation for external TopoDS_Shape object - 'F5' key to update content of each plugin - visibility column in tree view (used now only in ShapeView) - properties child item for context (presents tree of current Filters of context)
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/TreeModel_ItemBase.hxx>
|
||||
|
||||
#include <inspector/TreeModel_ItemRole.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
@@ -45,8 +46,19 @@ void TreeModel_ItemBase::Reset()
|
||||
anItem->Reset();
|
||||
}
|
||||
m_bInitialized = false;
|
||||
mycachedValues.clear();
|
||||
myCachedValues.clear();
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : Reset
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void TreeModel_ItemBase::Reset (int theRole)
|
||||
{
|
||||
if (!myCachedValues.contains (theRole))
|
||||
return;
|
||||
|
||||
myCachedValues.remove (theRole);
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
@@ -84,11 +96,11 @@ const TreeModel_ItemBasePtr TreeModel_ItemBase::currentItem()
|
||||
// =======================================================================
|
||||
QVariant TreeModel_ItemBase::cachedValue (const int theItemRole) const
|
||||
{
|
||||
if (mycachedValues.contains (theItemRole))
|
||||
return mycachedValues[theItemRole];
|
||||
if (myCachedValues.contains (theItemRole))
|
||||
return myCachedValues[theItemRole];
|
||||
|
||||
const_cast<TreeModel_ItemBase*>(this)->mycachedValues.insert (theItemRole,
|
||||
const_cast<TreeModel_ItemBase*>(this)->myCachedValues.insert (theItemRole,
|
||||
theItemRole == TreeModel_ItemRole_RowCountRole ? QVariant (initRowCount()) : initValue (theItemRole));
|
||||
|
||||
return mycachedValues.contains (theItemRole) ? mycachedValues[theItemRole] : QVariant();
|
||||
return myCachedValues.contains (theItemRole) ? myCachedValues[theItemRole] : QVariant();
|
||||
}
|
||||
|
Reference in New Issue
Block a user