mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2025-01-10 18:42:55 +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();
|
||||
|
||||
|
||||
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:
|
||||
//MetaHash archetypeName { get; set; } //8 8: Hash: 0: archetypeName
|
||||
|
@ -8374,16 +8374,16 @@ namespace CodeWalker.Project
|
||||
{
|
||||
if (CurrentYmapFile == null) return;
|
||||
|
||||
bool changechange = changed != CurrentYmapFile.HasChanged;
|
||||
if (!changechange) return;
|
||||
|
||||
CurrentYmapFile.HasChanged = changed;
|
||||
|
||||
ProjectExplorer?.SetYmapHasChanged(CurrentYmapFile, changed);
|
||||
|
||||
RefreshUI();
|
||||
|
||||
bool changechange = changed != CurrentYmapFile.HasChanged;
|
||||
if (!changechange) return;
|
||||
|
||||
PromoteIfPreviewPanelActive();
|
||||
|
||||
RefreshUI();
|
||||
}
|
||||
public void SetYtypHasChanged(bool changed)
|
||||
{
|
||||
|
@ -169,6 +169,7 @@ namespace CodeWalker
|
||||
MapSelection SelectedItem;
|
||||
MapSelection CopiedItem;
|
||||
WorldInfoForm InfoForm = null;
|
||||
public MapSelection CurrentMapSelection { get { return SelectedItem; } }
|
||||
|
||||
|
||||
TransformWidget Widget = new TransformWidget();
|
||||
@ -5864,7 +5865,7 @@ namespace CodeWalker
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ShowWidget && Widget.IsUnderMouse)
|
||||
if (ShowWidget && Widget.IsUnderMouse && !Input.kbmoving)
|
||||
{
|
||||
GrabbedWidget = Widget;
|
||||
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)
|
||||
{
|
||||
@ -6230,11 +6231,12 @@ namespace CodeWalker
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user