AppElements_Command* aCommand;
- aCommand = aGroup->addFeature("SAVE_CMD", tr("Save..."), tr("Save the document"),
+ aCommand = aGroup->addFeature("SAVE_CMD", tr("Save"), tr("Save the document"),
QIcon(":pictures/save.png"), QKeySequence::Save);
aCommand->connectTo(this, SLOT(onSave()));
//aCommand->disable();
}
//show file dialog, check if readable and open
- myCurrentDir = QFileDialog::getExistingDirectory(mainWindow());
+ myCurrentDir = QFileDialog::getExistingDirectory(mainWindow(), tr("Select folder"));
if (myCurrentDir.isEmpty())
return;
QFileInfo aFileInfo(myCurrentDir);
if(!isActiveOperationAborted())
return false;
QFileDialog dialog(mainWindow());
- dialog.setWindowTitle(tr("Select directory to save files..."));
+ dialog.setWindowTitle(tr("Select folder to save files..."));
dialog.setFileMode(QFileDialog::Directory);
dialog.setFilter(tr("Folders (*)"));
dialog.setOptions(QFileDialog::HideNameFilterDetails | QFileDialog::ShowDirsOnly);
if (!dialog.exec()) {
return false;
}
+
QString aTempDir = dialog.selectedFiles().first();
QDir aDir(aTempDir);
if (aDir.exists() && !aDir.entryInfoList(QDir::NoDotAndDotDot | QDir::AllEntries).isEmpty()) {
}
SessionPtr aMgr = ModelAPI_Session::get();
if (aMgr->hasModuleDocument()) {
- QAction *aUndoCmd, *aRedoCmd;
foreach(QAction* aCmd, aCommands) {
QString aId = aCmd->data().toString();
if (aId == "UNDO_CMD")
- aUndoCmd = aCmd;
+ aCmd->setEnabled(myModule->canUndo());
else if (aId == "REDO_CMD")
- aRedoCmd = aCmd;
+ aCmd->setEnabled(myModule->canRedo());
else
// Enable all commands
aCmd->setEnabled(true);
}
-
- aUndoCmd->setEnabled(myModule->canUndo());
- aRedoCmd->setEnabled(myModule->canRedo());
updateHistory();
} else {
foreach(QAction* aCmd, aCommands) {
void XGUI_Workshop::showObjects(const QObjectPtrList& theList, bool isVisible)
{
foreach (ObjectPtr aObj, theList) {
+ /*
ResultPartPtr aPartRes = std::dynamic_pointer_cast<ModelAPI_ResultPart>(aObj);
if (aPartRes) {
DocumentPtr aDoc = aPartRes->partDoc();
SET_DISPLAY_GROUP(ModelAPI_ResultConstruction::group(), isVisible)
SET_DISPLAY_GROUP(ModelAPI_ResultGroup::group(), isVisible)
} else {
+ */
aObj->setDisplayed(isVisible);
- }
+ //}
}
Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY));
}
// Show only objects from the list
foreach (ObjectPtr aObj, theList) {
+ /*
ResultPartPtr aPartRes = std::dynamic_pointer_cast<ModelAPI_ResultPart>(aObj);
if (aPartRes) {
DocumentPtr aDoc = aPartRes->partDoc();
SET_DISPLAY_GROUP(ModelAPI_ResultConstruction::group(), true)
SET_DISPLAY_GROUP(ModelAPI_ResultGroup::group(), true)
} else {
+ */
aObj->setDisplayed(true);
- }
+ //}
}
Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY));