Git Komut Rehberi & Terminal Asistanı
Sıfırdan Yeni Bir Depo Başlatın:
Mevcut Bir Git Deposu veya Klasörü Gönderin:
Hataları Geri Alma, İptal & Temizlik:
Son commit'i geri al (yapılan değişiklikleri korur):
git reset --soft HEAD~1
Yapılan yerel değişiklikleri iptal et (çalışma ağacını temizler):
git restore .
Takip edilmeyen gereksiz dosyaları sil:
git clean -fd
Değişiklikleri geçici sakla ve geri getir (stash):
git stash git stash pop
Dal (Branch) ve Sürüm Etiketleri:
Yeni dal aç ve geçiş yap:
git checkout -b yeni-ozellik git push -u origin yeni-ozellik
Sürüm etiketi (tag) oluştur ve gönder:
git tag -a v1.0.0 -m "Sürüm 1.0.0" git push origin --tags
Prevent project sync echo from rehydrating editor
This commit is contained in:
@@ -4178,6 +4178,8 @@ export function SketchForgeEditor({
|
||||
const pendingProjectShapesRef = useRef<WorkplaneShape[] | null>(null);
|
||||
const projectSyncTimerRef = useRef<number | null>(null);
|
||||
const lastProjectShapesSyncRef = useRef("");
|
||||
const lastProjectShapesEchoRef = useRef<string | null>(null);
|
||||
const lastProjectIdRef = useRef<string | null>(null);
|
||||
const projectSnapshotRunRef = useRef(0);
|
||||
const [projectInteractionActive, setProjectInteractionActive] = useState(false);
|
||||
|
||||
@@ -4308,6 +4310,7 @@ export function SketchForgeEditor({
|
||||
}
|
||||
projectSyncTimerRef.current = window.setTimeout(() => {
|
||||
lastProjectShapesSyncRef.current = serialized;
|
||||
lastProjectShapesEchoRef.current = serialized;
|
||||
onProjectShapesChange({ projectId, shapes: canonicalNext });
|
||||
projectSyncTimerRef.current = null;
|
||||
}, 120);
|
||||
@@ -4352,11 +4355,26 @@ export function SketchForgeEditor({
|
||||
|
||||
useEffect(() => {
|
||||
if (!projectId) {
|
||||
lastProjectIdRef.current = null;
|
||||
lastProjectShapesSyncRef.current = "";
|
||||
lastProjectShapesEchoRef.current = null;
|
||||
return;
|
||||
}
|
||||
if (lastProjectIdRef.current !== projectId) {
|
||||
lastProjectIdRef.current = projectId;
|
||||
lastProjectShapesSyncRef.current = "";
|
||||
lastProjectShapesEchoRef.current = null;
|
||||
}
|
||||
const incoming = initialShapes.map(canonicalizeShape);
|
||||
const incomingSerialized = projectShapesFingerprint(incoming);
|
||||
// The parent echoes shapes after a local save; rehydrating that echo can reset active transform state.
|
||||
if (lastProjectShapesEchoRef.current !== null && incomingSerialized === lastProjectShapesEchoRef.current) {
|
||||
lastProjectShapesSyncRef.current = incomingSerialized;
|
||||
return;
|
||||
}
|
||||
if (projectInteractionActiveRef.current) {
|
||||
return;
|
||||
}
|
||||
lastProjectShapesSyncRef.current = incomingSerialized;
|
||||
if (projectSyncTimerRef.current !== null) {
|
||||
window.clearTimeout(projectSyncTimerRef.current);
|
||||
|
||||
Reference in New Issue
Block a user