]> git.saurik.com Git - wxWidgets.git/commitdiff
Slight reorg of last change
authorRobin Dunn <robin@alldunn.com>
Sun, 6 Apr 2008 02:13:08 +0000 (02:13 +0000)
committerRobin Dunn <robin@alldunn.com>
Sun, 6 Apr 2008 02:13:08 +0000 (02:13 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53037 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/databrow.cpp

index 5118740c2900c83f00787f550b27c9fba1ba303d..e9fd7f3a816dd144ba64396fb86d7ada3b887972 100644 (file)
@@ -699,26 +699,22 @@ OSStatus wxMacDataViewDataBrowserListViewControl::DataBrowserGetSetItemDataProc(
                // variable definition and initialization:
                 wxVariant modifiedData(true);
 
-                if (dataViewCtrlPtr->GetModel()->SetValue(modifiedData, dvItem, col))
-                {
-                    dataViewCtrlPtr->GetModel()->ValueChanged(dvItem, col);
+                if (dataViewCtrlPtr->GetModel()->SetValue(modifiedData, dvItem, col) &&
+                    dataViewCtrlPtr->GetModel()->ValueChanged(dvItem, col))
                     return noErr;
-                }
                 else
-                    return errDataBrowserNotConfigured;
+                    return errDataBrowserInvalidPropertyData;
               } /* if */
               else if (buttonValue == kThemeButtonOff)
               {
                // variable definition and initialization:
                 wxVariant modifiedData(false);
 
-                if (dataViewCtrlPtr->GetModel()->SetValue(modifiedData, dvItem, col))
-                {
-                    dataViewCtrlPtr->GetModel()->ValueChanged(dvItem, col);
+                if (dataViewCtrlPtr->GetModel()->SetValue(modifiedData, dvItem, col) &&
+                    dataViewCtrlPtr->GetModel()->ValueChanged(dvItem, col))
                     return noErr;
-                }
                 else
-                    return errDataBrowserNotConfigured;
+                    return errDataBrowserInvalidPropertyData;
               } /* if */
               else
                 return errDataBrowserInvalidPropertyData;
@@ -742,13 +738,11 @@ OSStatus wxMacDataViewDataBrowserListViewControl::DataBrowserGetSetItemDataProc(
 #endif
               wxVariant           modifiedData(modifiedString.AsString());
               
-              if (dataViewCtrlPtr->GetModel()->SetValue(modifiedData, dvItem, col))
-              {
-                  dataViewCtrlPtr->GetModel()->ValueChanged(dvItem, col);
-                  return noErr;
-              }
-              else
-                return errDataBrowserNotConfigured;
+                if (dataViewCtrlPtr->GetModel()->SetValue(modifiedData, dvItem, col) &&
+                    dataViewCtrlPtr->GetModel()->ValueChanged(dvItem, col))
+                    return noErr;
+                else
+                    return errDataBrowserInvalidPropertyData;
             } /* if */
             else
               return errorStatus;