mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-18 14:31:50 +00:00
@ this may be a useful function
This commit is contained in:
parent
7a63edfc91
commit
24b275e6d3
1 changed files with 25 additions and 0 deletions
|
@ -136,6 +136,31 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
return null;
|
||||
}
|
||||
|
||||
// This pastes a prefab. Returns false when paste was cancelled.
|
||||
public void InsertPrefabStream(Stream stream, PasteOptions options)
|
||||
{
|
||||
// Cancel volatile mode
|
||||
General.Editing.DisengageVolatileMode();
|
||||
|
||||
// Let the plugins know
|
||||
if(General.Plugins.OnPasteBegin(options))
|
||||
{
|
||||
// Ask the editing mode to prepare selection for pasting.
|
||||
if(General.Editing.Mode.OnPasteBegin(options))
|
||||
{
|
||||
Cursor oldcursor = Cursor.Current;
|
||||
Cursor.Current = Cursors.WaitCursor;
|
||||
|
||||
if(stream != null)
|
||||
PastePrefab(stream, options);
|
||||
|
||||
General.MainWindow.UpdateInterface();
|
||||
|
||||
Cursor.Current = oldcursor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// This pastes a prefab. Returns false when paste was cancelled.
|
||||
internal void PastePrefab(Stream filedata, PasteOptions options)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue