+ if ((theColumn == 2) && (theRole == Qt::DecorationRole)) {
+ if (document().get()) {
+ SessionPtr aSession = ModelAPI_Session::get();
+ if (document() != aSession->activeDocument())
+ return QIcon();
+
+ FeaturePtr aFeature = document()->currentFeature(true);
+ if (!aFeature.get()) { // There is no current feature
+ ModuleBase_ITreeNode* aLastFolder = 0;
+ foreach(ModuleBase_ITreeNode* aNode, parent()->children()) {
+ if (aNode->type() == PartSet_FolderNode::typeId())
+ aLastFolder = aNode;
+ else
+ break;
+ }
+ if (aLastFolder == this)
+ return QIcon(":pictures/arrow.png");
+ else
+ return QIcon();
+ }
+ }
+ }