X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=contrib%2Fbobtoolz%2Ffunchandlers-GTK.cpp;h=b6ef6ff2d3b1a90d134685e3d9f26d08a6c8803d;hb=HEAD;hp=decbf8ad49825f1ae49404e33ff484b97100bbb0;hpb=1def25e964edbf47c1e62cea13a17b9628e3608e;p=xonotic%2Fnetradiant.git diff --git a/contrib/bobtoolz/funchandlers-GTK.cpp b/contrib/bobtoolz/funchandlers-GTK.cpp index decbf8ad..b6ef6ff2 100644 --- a/contrib/bobtoolz/funchandlers-GTK.cpp +++ b/contrib/bobtoolz/funchandlers-GTK.cpp @@ -463,7 +463,7 @@ void DoMergePatches(){ merge_info = mrgPatches[0].IsMergable( &mrgPatches[1] ); if ( merge_info.mergable ) { - globalOutputStream() << merge_info.pos1 << " " << merge_info.pos2; +// globalOutputStream() << merge_info.pos1 << " " << merge_info.pos2; //Message removed, No tools give feedback on success. //globalOutputStream() << "bobToolz MergePatches: Patches Mergable.\n"; DPatch* newPatch = mrgPatches[0].MergePatches( merge_info, &mrgPatches[0], &mrgPatches[1] ); @@ -481,10 +481,17 @@ void DoMergePatches(){ } else { + newPatch->BuildInRadiant( patches[0]->path().parent().get_pointer() ); + + scene::Instance& parent = *( patches[1]->parent() ); Path_deleteTop( patches[0]->path() ); Path_deleteTop( patches[1]->path() ); + Entity* entity = Node_getEntity( parent.path().top() ); + if ( entity != 0 + && Node_getTraversable( parent.path().top() )->empty() ) { + Path_deleteTop( parent.path() ); + } - newPatch->BuildInRadiant(); delete newPatch; } } @@ -519,7 +526,7 @@ void DoSplitPatch() { std::list patchList = patch.Split(); for ( std::list::iterator patches = patchList.begin(); patches != patchList.end(); patches++ ) { - ( *patches ).BuildInRadiant(); + ( *patches ).BuildInRadiant( instance.path().parent().get_pointer() ); } Path_deleteTop( instance.path() ); @@ -549,7 +556,7 @@ void DoSplitPatchCols() { std::list patchList = patch.SplitCols(); for ( std::list::iterator patches = patchList.begin(); patches != patchList.end(); patches++ ) { - ( *patches ).BuildInRadiant(); + ( *patches ).BuildInRadiant( instance.path().parent().get_pointer() ); } Path_deleteTop( instance.path() ); @@ -579,7 +586,7 @@ void DoSplitPatchRows() { std::list patchList = patch.SplitRows(); for ( std::list::iterator patches = patchList.begin(); patches != patchList.end(); patches++ ) { - ( *patches ).BuildInRadiant(); + ( *patches ).BuildInRadiant( instance.path().parent().get_pointer() ); } Path_deleteTop( instance.path() );