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
Make same planes cannot be used twice in partition tool
[modules/shaper.git]
/
src
/
XGUI
/
XGUI_DataModel.cpp
diff --git
a/src/XGUI/XGUI_DataModel.cpp
b/src/XGUI/XGUI_DataModel.cpp
index bac4aedaedd8c59127e137e8549799a1ac0228fc..fa38f0a1d4a129570bd723d9a2d22d54a2dee8fa 100644
(file)
--- a/
src/XGUI/XGUI_DataModel.cpp
+++ b/
src/XGUI/XGUI_DataModel.cpp
@@
-214,11
+214,7
@@
void XGUI_DataModel::processEvent(const std::shared_ptr<Events_Message>& theMess
break;
}
}
break;
}
}
- }
-#ifdef _DEBUG
- else
- Events_Error::send("Problem with Data Model definition of sub-document");
-#endif
+ }
}
}
} else if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_UPDATED)) {
}
}
} else if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_UPDATED)) {
@@
-259,7
+255,7
@@
void XGUI_DataModel::processEvent(const std::shared_ptr<Events_Message>& theMess
aParent = createIndex(folderId(aGroup, aDoc.get()), 0, aDoc.get());
}
int aChildNb = rowCount(aParent);
aParent = createIndex(folderId(aGroup, aDoc.get()), 0, aDoc.get());
}
int aChildNb = rowCount(aParent);
- rebuildBranch(aStartId, aChildNb - aStartId);
+ rebuildBranch(aStartId, aChildNb - aStartId
, aParent
);
} else if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_DOCUMENT_CHANGED)) {
DocumentPtr aDoc = ModelAPI_Session::get()->activeDocument();
if (aDoc != aRootDoc) {
} else if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_DOCUMENT_CHANGED)) {
DocumentPtr aDoc = ModelAPI_Session::get()->activeDocument();
if (aDoc != aRootDoc) {
@@
-375,13
+371,13
@@
QVariant XGUI_DataModel::data(const QModelIndex& theIndex, int theRole) const
case Qt::DecorationRole:
return QIcon(myXMLReader.rootFolderIcon(theIndexRow).c_str());
case Qt::ForegroundRole:
case Qt::DecorationRole:
return QIcon(myXMLReader.rootFolderIcon(theIndexRow).c_str());
case Qt::ForegroundRole:
- if ((
flags(theIndex
) & Qt::ItemIsEditable) == 0)
+ if ((
theIndex.flags(
) & Qt::ItemIsEditable) == 0)
return QBrush(Qt::lightGray);
return ACTIVE_COLOR;
}
} else { // an object or sub-document
if (theRole == Qt::ForegroundRole) {
return QBrush(Qt::lightGray);
return ACTIVE_COLOR;
}
} else { // an object or sub-document
if (theRole == Qt::ForegroundRole) {
- if ((
flags(theIndex
) & Qt::ItemIsEditable) == 0)
+ if ((
theIndex.flags(
) & Qt::ItemIsEditable) == 0)
return QBrush(Qt::lightGray);
return ACTIVE_COLOR;
}
return QBrush(Qt::lightGray);
return ACTIVE_COLOR;
}
@@
-735,7
+731,7
@@
Qt::ItemFlags XGUI_DataModel::flags(const QModelIndex& theIndex) const
} else if (aDoc) {
// A folder under sub-document
if (aActiveDoc.get() != aDoc)
} else if (aDoc) {
// A folder under sub-document
if (aActiveDoc.get() != aDoc)
- return a
Default
Flag;
+ return a
Null
Flag;
}
return aEditingFlag;
}
}
return aEditingFlag;
}