]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
fixed detail brushes being converted to structural by texture application
authorspog <spog>
Sat, 3 Jun 2006 13:24:20 +0000 (13:24 +0000)
committerspog <spog>
Sat, 3 Jun 2006 13:24:20 +0000 (13:24 +0000)
git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@77 8a3a26a2-13c4-0310-b231-cf6edde360e5

CHANGES
libs/gtkutil/accelerator.cpp
radiant/brush.h

diff --git a/CHANGES b/CHANGES
index e7eeaede95ad3d54d85c365a8b3f911167ab11fd..60931b228a775d20249c2e34d873835e3c05f391 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -5,6 +5,7 @@ that we distribute with the binaries. (see changelog)
 SPoG
 - Changed doom3 entity creation to add model key for brush-entities.
 - Fixed crash in Save Region.
+- Fixed detail brushes being turned structural when texture is set.
 
 29/05/2006
 SPoG
index 914fc9f9d7cfa030e60656fe4e41458f9ed4d579..af3eec1719a4e87fffe6b9907e0c8fe5a62bbdca 100644 (file)
@@ -642,7 +642,8 @@ void global_accel_group_remove_accelerator(Accelerator accelerator)
 /// \brief Propagates key events to the focus-widget, overriding global accelerators.
 static gboolean override_global_accelerators(GtkWindow* window, GdkEventKey* event, gpointer data)
 {
-  return gtk_window_propagate_key_event(window, event);
+  gboolean b = gtk_window_propagate_key_event(window, event);
+  return b;
 }
 
 void global_accel_connect_window(GtkWindow* window)
index 8d31d3e739f1b1e29e9df264b841b3ff3896b340..81d16a620f2da298efb1e8c50229e47d058b9bb2 100644 (file)
@@ -378,14 +378,18 @@ public:
   bool m_specified;
 };
 
-inline unsigned int ContentFlags_assignable(unsigned int contentFlags)
+inline void ContentsFlagsValue_assignMasked(ContentsFlagsValue& flags, const ContentsFlagsValue& other)
 {
-  return contentFlags & ~CONTENTS_DETAIL;
-}
-
-inline ContentsFlagsValue ContentsFlagsValue_maskDetail(const ContentsFlagsValue& other)
-{
-  return ContentsFlagsValue(other.m_surfaceFlags, ContentFlags_assignable(other.m_contentFlags), other.m_value, other.m_specified);
+  bool detail = bitfield_enabled(flags.m_contentFlags, CONTENTS_DETAIL);
+  flags = other;
+  if(detail)
+  {
+    flags.m_contentFlags = bitfield_enable(flags.m_contentFlags, CONTENTS_DETAIL);
+  }
+  else
+  {
+    flags.m_contentFlags = bitfield_disable(flags.m_contentFlags, CONTENTS_DETAIL);
+  }
 }
 
 
@@ -526,7 +530,7 @@ public:
   void setFlags(const ContentsFlagsValue& flags)
   {
     ASSERT_MESSAGE(m_realised, "FaceShader::setFlags: flags not valid when unrealised");
-    m_flags = ContentsFlagsValue_maskDetail(flags);
+    ContentsFlagsValue_assignMasked(m_flags, flags);
   }
 
   Shader* state() const