Merge branch 'master' into feature/tool-bit-poc
This commit is contained in:
@@ -326,10 +326,10 @@ void DlgMacroExecuteImp::on_editButton_clicked()
|
||||
PythonEditor* editor = new PythonEditor();
|
||||
editor->setWindowIcon(Gui::BitmapFactory().iconFromTheme("applications-python"));
|
||||
PythonEditorView* edit = new PythonEditorView(editor, getMainWindow());
|
||||
edit->setDisplayName(PythonEditorView::FileName);
|
||||
edit->open(file);
|
||||
edit->resize(400, 300);
|
||||
getMainWindow()->addWindow(edit);
|
||||
edit->setWindowTitle(item->text(0));
|
||||
|
||||
if (mitem->systemWide) {
|
||||
editor->setReadOnly(true);
|
||||
|
||||
@@ -58,20 +58,20 @@ UndoDialog::~UndoDialog()
|
||||
void UndoDialog::onFetchInfo()
|
||||
{
|
||||
clear(); // Remove first all items
|
||||
Gui::Document* pcDoc = Application::Instance->activeDocument();
|
||||
if (pcDoc)
|
||||
{
|
||||
std::vector<std::string> vecUndos = pcDoc->getUndoVector();
|
||||
for (std::vector<std::string>::iterator i=vecUndos.begin(); i!=vecUndos.end(); ++i)
|
||||
addAction(QString::fromUtf8((*i).c_str()), this, SLOT(onSelected()));
|
||||
|
||||
MDIView* mdi = getMainWindow()->activeWindow();
|
||||
EditorView* view = qobject_cast<EditorView*>(mdi);
|
||||
if (view) {
|
||||
QStringList vecUndos = view->undoActions();
|
||||
for (QStringList::Iterator i = vecUndos.begin(); i != vecUndos.end(); ++i)
|
||||
addAction(*i, this, SLOT(onSelected()));
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorView* view = qobject_cast<EditorView*>(getMainWindow()->activeWindow());
|
||||
if (view) {
|
||||
QStringList vecUndos = view->undoActions();
|
||||
for (QStringList::Iterator i=vecUndos.begin(); i!=vecUndos.end(); ++i)
|
||||
addAction(*i, this, SLOT(onSelected()));
|
||||
else if (mdi) {
|
||||
Gui::Document* pcDoc = mdi->getGuiDocument();
|
||||
if (pcDoc) {
|
||||
std::vector<std::string> vecUndos = pcDoc->getUndoVector();
|
||||
for (std::vector<std::string>::iterator i = vecUndos.begin(); i != vecUndos.end(); ++i)
|
||||
addAction(QString::fromUtf8((*i).c_str()), this, SLOT(onSelected()));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -115,20 +115,20 @@ RedoDialog::~RedoDialog()
|
||||
void RedoDialog::onFetchInfo()
|
||||
{
|
||||
clear(); // Remove first all items
|
||||
Gui::Document* pcDoc = Application::Instance->activeDocument();
|
||||
if (pcDoc)
|
||||
{
|
||||
std::vector<std::string> vecRedos = pcDoc->getRedoVector();
|
||||
for (std::vector<std::string>::iterator i=vecRedos.begin(); i!=vecRedos.end(); ++i)
|
||||
addAction(QString::fromUtf8((*i).c_str()), this, SLOT(onSelected()));
|
||||
|
||||
MDIView* mdi = getMainWindow()->activeWindow();
|
||||
EditorView* view = qobject_cast<EditorView*>(mdi);
|
||||
if (view) {
|
||||
QStringList vecRedos = view->redoActions();
|
||||
for (QStringList::Iterator i = vecRedos.begin(); i != vecRedos.end(); ++i)
|
||||
addAction(*i, this, SLOT(onSelected()));
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorView* view = qobject_cast<EditorView*>(getMainWindow()->activeWindow());
|
||||
if (view) {
|
||||
QStringList vecRedos = view->redoActions();
|
||||
for (QStringList::Iterator i=vecRedos.begin(); i!=vecRedos.end(); ++i)
|
||||
addAction(*i, this, SLOT(onSelected()));
|
||||
else if (mdi) {
|
||||
Gui::Document* pcDoc = mdi->getGuiDocument();
|
||||
if (pcDoc) {
|
||||
std::vector<std::string> vecRedos = pcDoc->getRedoVector();
|
||||
for (std::vector<std::string>::iterator i = vecRedos.begin(); i != vecRedos.end(); ++i)
|
||||
addAction(QString::fromUtf8((*i).c_str()), this, SLOT(onSelected()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,6 +104,7 @@ struct DocumentP
|
||||
std::map<const App::DocumentObject*,ViewProviderDocumentObject*> _ViewProviderMap;
|
||||
std::map<SoSeparator *,ViewProviderDocumentObject*> _CoinMap;
|
||||
std::map<std::string,ViewProvider*> _ViewProviderMapAnnotation;
|
||||
std::list<ViewProviderDocumentObject*> _redoViewProviders;
|
||||
|
||||
typedef boost::signals2::connection Connection;
|
||||
Connection connectNewObject;
|
||||
@@ -690,6 +691,9 @@ void Document::slotNewObject(const App::DocumentObject& Obj)
|
||||
|
||||
// it is possible that a new viewprovider already claims children
|
||||
handleChildren3D(pcProvider);
|
||||
if (d->_isTransacting) {
|
||||
d->_redoViewProviders.push_back(pcProvider);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2152,6 +2156,10 @@ void Document::redo(int iSteps)
|
||||
getDocument()->redo();
|
||||
}
|
||||
App::GetApplication().signalRedo();
|
||||
|
||||
for (auto it : d->_redoViewProviders)
|
||||
handleChildren3D(it);
|
||||
d->_redoViewProviders.clear();
|
||||
}
|
||||
|
||||
PyObject* Document::getPyObject(void)
|
||||
|
||||
@@ -356,7 +356,7 @@ def getsize(length, mode='discard', base=1):
|
||||
tomm = {
|
||||
'': 25.4/90, # default
|
||||
'px': 25.4/90,
|
||||
'pt': 1.25 * 25.4/90,
|
||||
'pt': 4.0/3 * 25.4/90,
|
||||
'pc': 15 * 25.4/90,
|
||||
'mm': 1.0,
|
||||
'cm': 10.0,
|
||||
@@ -369,7 +369,7 @@ def getsize(length, mode='discard', base=1):
|
||||
tomm = {
|
||||
'': 25.4/96, # default
|
||||
'px': 25.4/96,
|
||||
'pt': 1.25 * 25.4/96,
|
||||
'pt': 4.0/3 * 25.4/96,
|
||||
'pc': 15 * 25.4/96,
|
||||
'mm': 1.0,
|
||||
'cm': 10.0,
|
||||
@@ -382,7 +382,7 @@ def getsize(length, mode='discard', base=1):
|
||||
topx = {
|
||||
'': 1.0, # default
|
||||
'px': 1.0,
|
||||
'pt': 1.25,
|
||||
'pt': 4.0/3,
|
||||
'pc': 15,
|
||||
'mm': 90.0/25.4,
|
||||
'cm': 90.0/254.0,
|
||||
@@ -395,7 +395,7 @@ def getsize(length, mode='discard', base=1):
|
||||
topx = {
|
||||
'': 1.0, # default
|
||||
'px': 1.0,
|
||||
'pt': 1.25,
|
||||
'pt': 4.0/3,
|
||||
'pc': 15,
|
||||
'mm': 96.0/25.4,
|
||||
'cm': 96.0/254.0,
|
||||
|
||||
@@ -832,7 +832,7 @@ void TopoShape::write(const char *FileName) const
|
||||
}
|
||||
else if (File.hasExtension("stl")) {
|
||||
// read brep-file
|
||||
exportStl(File.filePath().c_str(),0);
|
||||
exportStl(File.filePath().c_str(), 0.01);
|
||||
}
|
||||
else{
|
||||
throw Base::FileException("Unknown extension");
|
||||
|
||||
@@ -580,7 +580,7 @@ PyObject* TopoShapePy::__setstate__(PyObject *args) {
|
||||
|
||||
PyObject* TopoShapePy::exportStl(PyObject *args)
|
||||
{
|
||||
double deflection = 0;
|
||||
double deflection = 0.01;
|
||||
char* Name;
|
||||
if (!PyArg_ParseTuple(args, "et|d","utf-8",&Name,&deflection))
|
||||
return NULL;
|
||||
|
||||
Binary file not shown.
@@ -406,7 +406,7 @@
|
||||
<message>
|
||||
<location filename="../../CommandCreateDims.cpp" line="715"/>
|
||||
<source>Insert a new vertical distance dimension</source>
|
||||
<translation>Eine vertikale Abstans-Bemaßung einfügen</translation>
|
||||
<translation>Eine vertikale Abstands-Bemaßung einfügen</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user