Compare commits
5 Commits
fix/pull-p
...
feat/nativ
| Author | SHA1 | Date | |
|---|---|---|---|
| af7eab3a70 | |||
| 6d231e80dd | |||
| a7ef5f195b | |||
|
|
7cf5867a7a | ||
|
|
9a6d1dfbd2 |
@@ -990,10 +990,8 @@ def _check_pull_conflicts(part_number, local_path, doc=None):
|
||||
conflicts = []
|
||||
|
||||
# Check for unsaved changes in an open document
|
||||
if doc is not None:
|
||||
gui_doc = FreeCADGui.getDocument(doc.Name) if doc.Name else None
|
||||
if gui_doc and gui_doc.Modified:
|
||||
conflicts.append("Document has unsaved local changes.")
|
||||
if doc is not None and doc.IsModified():
|
||||
conflicts.append("Document has unsaved local changes.")
|
||||
|
||||
# Check local revision vs server latest
|
||||
if doc is not None:
|
||||
@@ -1215,7 +1213,7 @@ class Silo_Pull:
|
||||
progress = QtGui.QProgressDialog(
|
||||
f"Downloading {part_number} rev {rev_num}...", "Cancel", 0, 100
|
||||
)
|
||||
progress.setWindowModality(QtCore.Qt.WindowModal)
|
||||
progress.setWindowModality(2) # Qt.WindowModal
|
||||
progress.setMinimumDuration(0)
|
||||
progress.setValue(0)
|
||||
|
||||
|
||||
@@ -392,8 +392,10 @@ class SiloOrigin:
|
||||
obj.SiloPartNumber, str(file_path), properties, comment=""
|
||||
)
|
||||
|
||||
# Clear modified flag
|
||||
doc.Modified = False
|
||||
# Clear modified flag (Modified is on Gui.Document, not App.Document)
|
||||
gui_doc = FreeCADGui.getDocument(doc.Name)
|
||||
if gui_doc:
|
||||
gui_doc.Modified = False
|
||||
|
||||
return True
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user