Browse Source

Only respond to click event, instead of both mouse down + click

Josh Engebretson 10 years ago
parent
commit
1414d1ae70
1 changed files with 3 additions and 8 deletions
  1. 3 8
      Source/AtomicEditor/Editors/ResourceEditor.cpp

+ 3 - 8
Source/AtomicEditor/Editors/ResourceEditor.cpp

@@ -61,7 +61,7 @@ public:
 
     bool OnEvent(const TBWidgetEvent &ev)
     {
-        if (ev.type == EVENT_TYPE_CLICK || ev.type == EVENT_TYPE_POINTER_DOWN)
+        if (ev.type == EVENT_TYPE_CLICK)
         {
             if (ev.target->GetID() == TBIDC("unsaved_modifications_dialog"))
             {
@@ -81,9 +81,10 @@ public:
                     container_->OnEvent(ev);
                     editor_->Close(container_->GetNumPages()>1);
                 }
+
                 return true;
             }
-            if (ev.target->GetID() == TBIDC("tabclose"))
+            else if (ev.target->GetID() == TBIDC("tabclose"))
             {
                 if (RequestClose())
                 {
@@ -91,12 +92,6 @@ public:
                     return true;
                 }
             }
-            else 
-            {
-                TBWidgetEvent nevent = ev;
-                nevent.target = this;
-                container_->OnEvent(nevent);
-            }
         }
 
         return false;