mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2025-01-10 22:33:00 +08:00
Attempted fixes for crashing/freezing while dragging the widget
This commit is contained in:
parent
1c31bd4a4f
commit
6b26eb16de
@ -156,7 +156,11 @@ namespace CodeWalker.Project.Panels
|
|||||||
UpdateTabVisibility();
|
UpdateTabVisibility();
|
||||||
|
|
||||||
|
|
||||||
ProjectForm.WorldForm?.SelectObject(CurrentEntity); //hopefully the drawable is already loaded - this will try get from cache
|
var ms = ProjectForm.WorldForm?.CurrentMapSelection;
|
||||||
|
if ((ms?.EntityDef != CurrentEntity) && (ms?.MloEntityDef != CurrentEntity))
|
||||||
|
{
|
||||||
|
ProjectForm.WorldForm?.SelectObject(CurrentEntity); //hopefully the drawable is already loaded - this will try get from cache
|
||||||
|
}
|
||||||
|
|
||||||
////struct CEntityDef:
|
////struct CEntityDef:
|
||||||
//MetaHash archetypeName { get; set; } //8 8: Hash: 0: archetypeName
|
//MetaHash archetypeName { get; set; } //8 8: Hash: 0: archetypeName
|
||||||
|
@ -8374,16 +8374,16 @@ namespace CodeWalker.Project
|
|||||||
{
|
{
|
||||||
if (CurrentYmapFile == null) return;
|
if (CurrentYmapFile == null) return;
|
||||||
|
|
||||||
|
bool changechange = changed != CurrentYmapFile.HasChanged;
|
||||||
|
if (!changechange) return;
|
||||||
|
|
||||||
CurrentYmapFile.HasChanged = changed;
|
CurrentYmapFile.HasChanged = changed;
|
||||||
|
|
||||||
ProjectExplorer?.SetYmapHasChanged(CurrentYmapFile, changed);
|
ProjectExplorer?.SetYmapHasChanged(CurrentYmapFile, changed);
|
||||||
|
|
||||||
RefreshUI();
|
|
||||||
|
|
||||||
bool changechange = changed != CurrentYmapFile.HasChanged;
|
|
||||||
if (!changechange) return;
|
|
||||||
|
|
||||||
PromoteIfPreviewPanelActive();
|
PromoteIfPreviewPanelActive();
|
||||||
|
|
||||||
|
RefreshUI();
|
||||||
}
|
}
|
||||||
public void SetYtypHasChanged(bool changed)
|
public void SetYtypHasChanged(bool changed)
|
||||||
{
|
{
|
||||||
|
@ -169,6 +169,7 @@ namespace CodeWalker
|
|||||||
MapSelection SelectedItem;
|
MapSelection SelectedItem;
|
||||||
MapSelection CopiedItem;
|
MapSelection CopiedItem;
|
||||||
WorldInfoForm InfoForm = null;
|
WorldInfoForm InfoForm = null;
|
||||||
|
public MapSelection CurrentMapSelection { get { return SelectedItem; } }
|
||||||
|
|
||||||
|
|
||||||
TransformWidget Widget = new TransformWidget();
|
TransformWidget Widget = new TransformWidget();
|
||||||
@ -5864,7 +5865,7 @@ namespace CodeWalker
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (ShowWidget && Widget.IsUnderMouse)
|
if (ShowWidget && Widget.IsUnderMouse && !Input.kbmoving)
|
||||||
{
|
{
|
||||||
GrabbedWidget = Widget;
|
GrabbedWidget = Widget;
|
||||||
GrabbedWidget.IsDragging = true;
|
GrabbedWidget.IsDragging = true;
|
||||||
@ -6157,7 +6158,7 @@ namespace CodeWalker
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!Input.kbmoving) //don't trigger further actions if moving.
|
if (!Input.kbmoving && !Widget.IsDragging) //don't trigger further actions if camera moving or widget dragging
|
||||||
{
|
{
|
||||||
if (!ctrl)
|
if (!ctrl)
|
||||||
{
|
{
|
||||||
@ -6230,10 +6231,11 @@ namespace CodeWalker
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (k == Keys.Escape) //temporary? panic get cursor back when in first person mode
|
}
|
||||||
{
|
|
||||||
if (ControlMode != WorldControlMode.Free) SetControlMode(WorldControlMode.Free);
|
if (k == Keys.Escape) //temporary? panic get cursor back when in first person mode
|
||||||
}
|
{
|
||||||
|
if (ControlMode != WorldControlMode.Free) SetControlMode(WorldControlMode.Free);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ControlMode != WorldControlMode.Free || ControlBrushEnabled)
|
if (ControlMode != WorldControlMode.Free || ControlBrushEnabled)
|
||||||
|
Loading…
Reference in New Issue
Block a user