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
Operation Prs: green preview is low. Scenario: Sketch, Start Circle, 1st Click, move...
[modules/shaper.git]
/
src
/
XGUI
/
XGUI_ObjectsBrowser.cpp
diff --git
a/src/XGUI/XGUI_ObjectsBrowser.cpp
b/src/XGUI/XGUI_ObjectsBrowser.cpp
index 4846e2237b2d4d5b6aa31f011880f9dc28bcda5a..c43ca86fa984f2763438d973f0266923fb7f1d79 100644
(file)
--- a/
src/XGUI/XGUI_ObjectsBrowser.cpp
+++ b/
src/XGUI/XGUI_ObjectsBrowser.cpp
@@
-130,16
+130,17
@@
void XGUI_DataTree::onDoubleClick(const QModelIndex& theIndex)
{
if (theIndex.column() != 1)
return;
{
if (theIndex.column() != 1)
return;
+ SessionPtr aMgr = ModelAPI_Session::get();
+ // When operation is opened then we can not change history
+ if (aMgr->isOperation())
+ return;
ModuleBase_IDocumentDataModel* aModel = dataModel();
if (aModel->flags(theIndex) == 0)
return;
ObjectPtr aObj = aModel->object(theIndex);
ModuleBase_IDocumentDataModel* aModel = dataModel();
if (aModel->flags(theIndex) == 0)
return;
ObjectPtr aObj = aModel->object(theIndex);
- SessionPtr aMgr = ModelAPI_Session::get();
DocumentPtr aDoc = aMgr->activeDocument();
DocumentPtr aDoc = aMgr->activeDocument();
- QModelIndex aOldIndex = aModel->lastHistoryIndex();
-
std::string aOpName = tr("History change").toStdString();
if (aObj.get()) {
if (aObj->document() != aDoc)
std::string aOpName = tr("History change").toStdString();
if (aObj.get()) {
if (aObj->document() != aDoc)
@@
-162,13
+163,10
@@
void XGUI_DataTree::onDoubleClick(const QModelIndex& theIndex)
}
QModelIndex aNewIndex = aModel->lastHistoryIndex();
QModelIndex aParent = theIndex.parent();
}
QModelIndex aNewIndex = aModel->lastHistoryIndex();
QModelIndex aParent = theIndex.parent();
- int aStartRow = std::min(aOldIndex.row(), aNewIndex.row());
- int aEndRow = std::max(aOldIndex.row(), aNewIndex.row());
- for (int i = aStartRow; i <= aEndRow; i++) {
+ int aSize = aModel->rowCount(aParent);
+ for (int i = 0; i < aSize; i++) {
update(aModel->index(i, 0, aParent));
}
update(aModel->index(i, 0, aParent));
}
- update(aOldIndex);
- update(aNewIndex);
}
//********************************************************************
}
//********************************************************************