//#define DEBUG_FEATURE_NAME
//#define DEBUG_CLEAN_HISTORY
-
-static QString MyFilter(QObject::tr("OpenParts files (*.opp)"));
+#ifdef HAVE_SALOME
+static QString MyFilter(QObject::tr("SHAPER files (*.shaper *.opp)"));
+static QString MyFilter2(QObject::tr("SHAPER files (*.shaper)"));
+static QString MyExtension(".shaper");
+#else
+static QString MyFilter(QObject::tr("OpenParts files (*.opp);;All files (*.*)"));
+static QString MyFilter2(QObject::tr("OpenParts files (*.opp)"));
+static QString MyExtension(".opp");
+#endif
//******************************************************
//IMP: an attempt to use result selection with other selection modes
myViewerSelMode.append(ModuleBase_ResultPrs::Sel_Result);//TopAbs_VERTEX);
myViewerSelMode.append(TopAbs_COMPSOLID);
-
- qDebug("### Tmp: %s", qPrintable(myTmpDir.path()));
}
//******************************************************
delete myDisplayer;
delete myDataModelXMLReader;
+ delete mySelectionActivate;
+ delete myMenuMgr;
clearTemporaryDir();
}
salomeConnector()->addDesktopMenuSeparator("MEN_DESK_EDIT");
- aAction = salomeConnector()->addDesktopCommand("AUTOCOMPUTE_CMD", tr("Block auto-apply"),
+ aAction = salomeConnector()->addDesktopCommand("AUTOCOMPUTE_CMD", tr("Auto rebuild"),
tr("Blocks immediate apply of modifications"),
QIcon(":pictures/autoapply.png"), QKeySequence(),
- true, "MEN_DESK_EDIT");
+ false, "MEN_DESK_EDIT");
salomeConnector()->addActionInToolbar( aAction, aToolBarTitle );
- connect(aAction, SIGNAL(toggled(bool)), this, SLOT(onAutoApply(bool)));
+ connect(aAction, SIGNAL(triggered(bool)), this, SLOT(onAutoApply()));
salomeConnector()->addDesktopMenuSeparator("MEN_DESK_EDIT");
aSession->closeAll();
clearTemporaryDir();
- XGUI_CompressFiles::uncompress(myCurrentFile, myTmpDir.path());
+ if (!XGUI_CompressFiles::uncompress(myCurrentFile, myTmpDir.path()))
+ return;
aSession->load(myTmpDir.path().toLatin1().constData());
myObjectBrowser->rebuildDataTree();
std::list<std::string> aFiles;
saveDocument(myTmpDir.path(), aFiles);
- XGUI_CompressFiles::compress(myCurrentFile, aFiles);
+ if (!XGUI_CompressFiles::compress(myCurrentFile, aFiles))
+ return false;
updateCommandStatus();
#ifndef HAVE_SALOME
{
if(!myOperationMgr->abortAllOperations(XGUI_OperationMgr::XGUI_InformationMessage))
return false;
-#ifndef HAVE_SALOME
myCurrentFile = QFileDialog::getSaveFileName(desktop(), tr("Select name to save file..."),
- QString(), MyFilter);
+ QString(), MyFilter2);
if (!myCurrentFile.isNull()) {
+ if (!myCurrentFile.endsWith(MyExtension)) {
+ myCurrentFile += MyExtension;
+ }
+ }
+ else
+ return false;
+#ifndef HAVE_SALOME
myMainWindow->setCurrentDir(myCurrentFile, false);
myMainWindow->setModifiedState(false);
- }
#endif
return onSave();
}
}
if (aSelList.count() > theObjects.count()) {
// if something was found
- bool aBlocked = objectBrowser()->blockSignals(true);
objectBrowser()->setObjectsSelected(aSelList);
- objectBrowser()->blockSignals(aBlocked);
objectBrowser()->ensureVisible(aNewSel.first());
}
if (aHasHidden)
}
if (aSelList.count() > theObjects.count()) {
// if something was found
- bool aBlocked = objectBrowser()->blockSignals(true);
objectBrowser()->setObjectsSelected(aSelList);
- objectBrowser()->blockSignals(aBlocked);
objectBrowser()->ensureVisible(aNewSel.first());
}
}