aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--linden/indra/newview/hippoLimits.cpp24
-rw-r--r--linden/indra/newview/hippoLimits.h3
-rw-r--r--linden/indra/newview/llfloatertools.cpp2
-rw-r--r--linden/indra/newview/llinventoryactions.cpp5
-rw-r--r--linden/indra/newview/llinventorybridge.cpp49
-rw-r--r--linden/indra/newview/llinventorybridge.h1
-rw-r--r--linden/indra/newview/llinventoryclipboard.cpp18
-rw-r--r--linden/indra/newview/llinventoryclipboard.h7
-rw-r--r--linden/indra/newview/llmaniptranslate.cpp15
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/menu_inventory.xml12
-rw-r--r--linden/indra/newview/wlsettingsmanager.cpp4
11 files changed, 119 insertions, 21 deletions
diff --git a/linden/indra/newview/hippoLimits.cpp b/linden/indra/newview/hippoLimits.cpp
index 88b86a9..78a5856 100644
--- a/linden/indra/newview/hippoLimits.cpp
+++ b/linden/indra/newview/hippoLimits.cpp
@@ -173,7 +173,7 @@ F32 HippoLimits::getMinPrimXPos() const
173{ 173{
174 if (gSavedSettings.getBOOL("DisableMaxBuildConstraints") && !mEnforceMaxBuild) 174 if (gSavedSettings.getBOOL("DisableMaxBuildConstraints") && !mEnforceMaxBuild)
175 { 175 {
176 return FLT_MAX; 176 return FLT_MIN;
177 } 177 }
178 else 178 else
179 { 179 {
@@ -185,7 +185,7 @@ F32 HippoLimits::getMinPrimYPos() const
185{ 185{
186 if (gSavedSettings.getBOOL("DisableMaxBuildConstraints") && !mEnforceMaxBuild) 186 if (gSavedSettings.getBOOL("DisableMaxBuildConstraints") && !mEnforceMaxBuild)
187 { 187 {
188 return FLT_MAX; 188 return FLT_MIN;
189 } 189 }
190 else 190 else
191 { 191 {
@@ -197,10 +197,28 @@ F32 HippoLimits::getMinPrimZPos() const
197{ 197{
198 if (gSavedSettings.getBOOL("DisableMaxBuildConstraints") && !mEnforceMaxBuild) 198 if (gSavedSettings.getBOOL("DisableMaxBuildConstraints") && !mEnforceMaxBuild)
199 { 199 {
200 return FLT_MAX; 200 return FLT_MIN;
201 } 201 }
202 else 202 else
203 { 203 {
204 return mMinPrimZPos; 204 return mMinPrimZPos;
205 } 205 }
206} 206}
207
208F32 HippoLimits::getMaxDragDistance() const
209{
210 if (mMaxDragDistance == 0)
211 {
212 return FLT_MAX;
213 }
214 else
215 {
216 F32 max_drag_distance = gSavedSettings.getBOOL("LimitDragDistance") ? gSavedSettings.getF32("MaxDragDistance") : FLT_MAX;
217
218 if(max_drag_distance > gHippoLimits->getMaxDragDistance()) //Chose the more restrictive
219 {
220 max_drag_distance = gHippoLimits->getMaxDragDistance();
221 }
222 return max_drag_distance;
223 }
224} \ No newline at end of file
diff --git a/linden/indra/newview/hippoLimits.h b/linden/indra/newview/hippoLimits.h
index a5493eb..7792a2c 100644
--- a/linden/indra/newview/hippoLimits.h
+++ b/linden/indra/newview/hippoLimits.h
@@ -12,7 +12,6 @@ public:
12 const F32& getMinHoleSize() const { return mMinHoleSize; } 12 const F32& getMinHoleSize() const { return mMinHoleSize; }
13 const F32& getMaxHollow() const { return mMaxHollow; } 13 const F32& getMaxHollow() const { return mMaxHollow; }
14 const S32& getMaxLinkedPrims() const { return mMaxLinkedPrims; } 14 const S32& getMaxLinkedPrims() const { return mMaxLinkedPrims; }
15 const F32& getMaxDragDistance() const { return mMaxDragDistance; }
16 const S32& getMaxPhysLinkedPrims() const { return mMaxPhysLinkedPrims; } 15 const S32& getMaxPhysLinkedPrims() const { return mMaxPhysLinkedPrims; }
17 const F32& getMaxInventoryItemsTransfer() const { return mMaxInventoryItemsTransfer; } 16 const F32& getMaxInventoryItemsTransfer() const { return mMaxInventoryItemsTransfer; }
18 17
@@ -21,6 +20,8 @@ public:
21 F32 getMinPrimScale() const; 20 F32 getMinPrimScale() const;
22 F32 getMaxPrimScale() const; 21 F32 getMaxPrimScale() const;
23 22
23 F32 getMaxDragDistance() const;
24
24 F32 getMinPrimXPos() const; 25 F32 getMinPrimXPos() const;
25 F32 getMinPrimYPos() const; 26 F32 getMinPrimYPos() const;
26 F32 getMinPrimZPos() const; 27 F32 getMinPrimZPos() const;
diff --git a/linden/indra/newview/llfloatertools.cpp b/linden/indra/newview/llfloatertools.cpp
index c092f5a..2f02f1e 100644
--- a/linden/indra/newview/llfloatertools.cpp
+++ b/linden/indra/newview/llfloatertools.cpp
@@ -195,7 +195,7 @@ void LLFloaterTools::updateToolsSizeLimits()
195 195
196 getChild<LLSpinCtrl>("Pos X")->setMaxValue(gHippoLimits->getMaxPrimXPos()); 196 getChild<LLSpinCtrl>("Pos X")->setMaxValue(gHippoLimits->getMaxPrimXPos());
197 getChild<LLSpinCtrl>("Pos Y")->setMaxValue(gHippoLimits->getMaxPrimYPos()); 197 getChild<LLSpinCtrl>("Pos Y")->setMaxValue(gHippoLimits->getMaxPrimYPos());
198 getChild<LLSpinCtrl>("Pos Z")->setMaxValue(gHippoLimits->getMinPrimZPos()); 198 getChild<LLSpinCtrl>("Pos Z")->setMaxValue(gHippoLimits->getMaxPrimZPos());
199 199
200 getChild<LLCheckBoxCtrl>("Physical Checkbox Ctrl")->setEnabled(gHippoLimits->mAllowPhysicalPrims); 200 getChild<LLCheckBoxCtrl>("Physical Checkbox Ctrl")->setEnabled(gHippoLimits->mAllowPhysicalPrims);
201} 201}
diff --git a/linden/indra/newview/llinventoryactions.cpp b/linden/indra/newview/llinventoryactions.cpp
index 7ae96ad..25a4a4b 100644
--- a/linden/indra/newview/llinventoryactions.cpp
+++ b/linden/indra/newview/llinventoryactions.cpp
@@ -119,6 +119,11 @@ bool doToSelected(LLFolderView* folder, std::string action)
119 LLInventoryClipboard::instance().reset(); 119 LLInventoryClipboard::instance().reset();
120 } 120 }
121 121
122 if ("cut" == action)
123 {
124 LLInventoryClipboard::instance().reset();
125 }
126
122 std::set<LLUUID> selected_items; 127 std::set<LLUUID> selected_items;
123 folder->getSelectionList(selected_items); 128 folder->getSelectionList(selected_items);
124 129
diff --git a/linden/indra/newview/llinventorybridge.cpp b/linden/indra/newview/llinventorybridge.cpp
index b1627b5..f71df2d 100644
--- a/linden/indra/newview/llinventorybridge.cpp
+++ b/linden/indra/newview/llinventorybridge.cpp
@@ -463,6 +463,12 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, std::vector<std::str
463 463
464 items.push_back(std::string("Copy Separator")); 464 items.push_back(std::string("Copy Separator"));
465 465
466 items.push_back(std::string("Cut"));
467 if (!isItemCopyable())
468 {
469 disabled_items.push_back(std::string("Cut"));
470 }
471
466 items.push_back(std::string("Copy")); 472 items.push_back(std::string("Copy"));
467 if (!isItemCopyable()) 473 if (!isItemCopyable())
468 { 474 {
@@ -813,6 +819,11 @@ void LLItemBridge::performAction(LLFolderView* folder, LLInventoryModel* model,
813 copyToClipboard(); 819 copyToClipboard();
814 return; 820 return;
815 } 821 }
822 else if ("cut" == action)
823 {
824 cutToClipboard();
825 return;
826 }
816 else if ("paste" == action) 827 else if ("paste" == action)
817 { 828 {
818 // Single item only 829 // Single item only
@@ -1086,6 +1097,15 @@ BOOL LLItemBridge::copyToClipboard() const
1086 } 1097 }
1087 return FALSE; 1098 return FALSE;
1088} 1099}
1100BOOL LLItemBridge::cutToClipboard() const
1101{
1102 if(isItemCopyable())
1103 {
1104 LLInventoryClipboard::instance().addCut(mUUID);
1105 return TRUE;
1106 }
1107 return FALSE;
1108}
1089 1109
1090LLViewerInventoryItem* LLItemBridge::getItem() const 1110LLViewerInventoryItem* LLItemBridge::getItem() const
1091{ 1111{
@@ -1890,6 +1910,35 @@ void LLFolderBridge::pasteFromClipboard()
1890 LLPointer<LLInventoryCallback>(NULL)); 1910 LLPointer<LLInventoryCallback>(NULL));
1891 } 1911 }
1892 } 1912 }
1913 //Do cuts as well
1914 LLInventoryClipboard::instance().retrieveCuts(objects);
1915 count = objects.count();
1916 parent_id = mUUID;
1917 for(S32 i = 0; i < count; i++)
1918 {
1919 item = model->getItem(objects.get(i));
1920 if (item)
1921 {
1922 copy_inventory_item(
1923 gAgent.getID(),
1924 item->getPermissions().getOwner(),
1925 item->getUUID(),
1926 parent_id,
1927 std::string(),
1928 LLPointer<LLInventoryCallback>(NULL));
1929 LLInventoryCategory* cat = model->getCategory(item->getUUID());
1930 if(cat)
1931 {
1932 model->purgeDescendentsOf(mUUID);
1933 }
1934 LLInventoryObject* obj = model->getObject(item->getUUID());
1935 if(!obj) return;
1936 obj->removeFromServer();
1937 LLPreview::hide(item->getUUID());
1938 model->deleteObject(item->getUUID());
1939 model->notifyObservers();
1940 }
1941 }
1893 } 1942 }
1894} 1943}
1895 1944
diff --git a/linden/indra/newview/llinventorybridge.h b/linden/indra/newview/llinventorybridge.h
index 45486ed..2004678 100644
--- a/linden/indra/newview/llinventorybridge.h
+++ b/linden/indra/newview/llinventorybridge.h
@@ -297,6 +297,7 @@ public:
297 virtual BOOL removeItem(); 297 virtual BOOL removeItem();
298 virtual BOOL isItemCopyable() const; 298 virtual BOOL isItemCopyable() const;
299 virtual BOOL copyToClipboard() const; 299 virtual BOOL copyToClipboard() const;
300 virtual BOOL cutToClipboard() const;
300 virtual BOOL hasChildren() const { return FALSE; } 301 virtual BOOL hasChildren() const { return FALSE; }
301 virtual BOOL isUpToDate() const { return TRUE; } 302 virtual BOOL isUpToDate() const { return TRUE; }
302 303
diff --git a/linden/indra/newview/llinventoryclipboard.cpp b/linden/indra/newview/llinventoryclipboard.cpp
index 94ffcbd..95c22aa 100644
--- a/linden/indra/newview/llinventoryclipboard.cpp
+++ b/linden/indra/newview/llinventoryclipboard.cpp
@@ -60,6 +60,11 @@ void LLInventoryClipboard::add(const LLUUID& object)
60 mObjects.put(object); 60 mObjects.put(object);
61} 61}
62 62
63void LLInventoryClipboard::addCut(const LLUUID& object)
64{
65 mCutObjects.put(object);
66}
67
63// this stores a single inventory object 68// this stores a single inventory object
64void LLInventoryClipboard::store(const LLUUID& object) 69void LLInventoryClipboard::store(const LLUUID& object)
65{ 70{
@@ -87,15 +92,26 @@ void LLInventoryClipboard::retrieve(LLDynamicArray<LLUUID>& inv_objects) const
87 } 92 }
88} 93}
89 94
95void LLInventoryClipboard::retrieveCuts(LLDynamicArray<LLUUID>& inv_objects) const
96{
97 inv_objects.reset();
98 S32 count = mCutObjects.count();
99 for(S32 i = 0; i < count; i++)
100 {
101 inv_objects.put(mCutObjects[i]);
102 }
103}
104
90void LLInventoryClipboard::reset() 105void LLInventoryClipboard::reset()
91{ 106{
92 mObjects.reset(); 107 mObjects.reset();
108 mCutObjects.reset();
93} 109}
94 110
95// returns true if the clipboard has something pasteable in it. 111// returns true if the clipboard has something pasteable in it.
96BOOL LLInventoryClipboard::hasContents() const 112BOOL LLInventoryClipboard::hasContents() const
97{ 113{
98 return (mObjects.count() > 0); 114 return (mObjects.count() > 0) || (mCutObjects.count() > 0);
99} 115}
100 116
101 117
diff --git a/linden/indra/newview/llinventoryclipboard.h b/linden/indra/newview/llinventoryclipboard.h
index 7a2cf15..99e8450 100644
--- a/linden/indra/newview/llinventoryclipboard.h
+++ b/linden/indra/newview/llinventoryclipboard.h
@@ -54,6 +54,8 @@ public:
54 // this method adds to the current list. 54 // this method adds to the current list.
55 void add(const LLUUID& object); 55 void add(const LLUUID& object);
56 56
57 void addCut(const LLUUID& object);
58
57 // this stores a single inventory object 59 // this stores a single inventory object
58 void store(const LLUUID& object); 60 void store(const LLUUID& object);
59 61
@@ -64,6 +66,10 @@ public:
64 // into the array provided. 66 // into the array provided.
65 void retrieve(LLDynamicArray<LLUUID>& inventory_objects) const; 67 void retrieve(LLDynamicArray<LLUUID>& inventory_objects) const;
66 68
69 // this method gets the objects in the clipboard by copying them
70 // into the array provided.
71 void retrieveCuts(LLDynamicArray<LLUUID>& inventory_objects) const;
72
67 // this method empties out the clipboard 73 // this method empties out the clipboard
68 void reset(); 74 void reset();
69 75
@@ -74,6 +80,7 @@ protected:
74 static LLInventoryClipboard sInstance; 80 static LLInventoryClipboard sInstance;
75 81
76 LLDynamicArray<LLUUID> mObjects; 82 LLDynamicArray<LLUUID> mObjects;
83 LLDynamicArray<LLUUID> mCutObjects;
77 84
78public: 85public:
79 // please don't actually call these 86 // please don't actually call these
diff --git a/linden/indra/newview/llmaniptranslate.cpp b/linden/indra/newview/llmaniptranslate.cpp
index aada658..cc14b27 100644
--- a/linden/indra/newview/llmaniptranslate.cpp
+++ b/linden/indra/newview/llmaniptranslate.cpp
@@ -529,16 +529,13 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
529 relative_move -= mDragCursorStartGlobal; 529 relative_move -= mDragCursorStartGlobal;
530 530
531 // You can't move more than some distance from your original mousedown point. 531 // You can't move more than some distance from your original mousedown point.
532 if (gSavedSettings.getBOOL("LimitDragDistance")) 532 F32 max_drag_distance = gHippoLimits->getMaxDragDistance();
533 {
534 F32 max_drag_distance = gSavedSettings.getF32("MaxDragDistance");
535 533
536 if(max_drag_distance < gHippoLimits->getMaxDragDistance()) max_drag_distance = gHippoLimits->getMaxDragDistance(); //Take the more restrictive if (relative_move.magVecSquared() > max_drag_distance * max_drag_distance) 534 if (max_drag_distance != FLT_MAX && relative_move.magVecSquared() > max_drag_distance * max_drag_distance)
537 { 535 {
538 lldebugst(LLERR_USER_INPUT) << "hover handled by LLManipTranslate (too far)" << llendl; 536 lldebugst(LLERR_USER_INPUT) << "hover handled by LLManipTranslate (too far)" << llendl;
539 gViewerWindow->setCursor(UI_CURSOR_NOLOCKED); 537 gViewerWindow->setCursor(UI_CURSOR_NOLOCKED);
540 return TRUE; 538 return TRUE;
541 }
542 } 539 }
543 540
544 F64 axis_magnitude = relative_move * axis_d; // dot product 541 F64 axis_magnitude = relative_move * axis_d; // dot product
diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_inventory.xml b/linden/indra/newview/skins/default/xui/en-us/menu_inventory.xml
index 1ae7465..86dc5c7 100644
--- a/linden/indra/newview/skins/default/xui/en-us/menu_inventory.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/menu_inventory.xml
@@ -166,11 +166,15 @@
166 <on_click filter="" function="Inventory.DoToSelected" userdata="copy_uuid" /> 166 <on_click filter="" function="Inventory.DoToSelected" userdata="copy_uuid" />
167 </menu_item_call> 167 </menu_item_call>
168 <menu_item_separator name="Copy Separator" /> 168 <menu_item_separator name="Copy Separator" />
169 <menu_item_call bottom_delta="-18" height="18" label="Copy" left="0" mouse_opaque="true" 169 <menu_item_call bottom_delta="-18" height="18" label="Cut" left="0" mouse_opaque="true"
170 name="Cut" width="128">
171 <on_click filter="" function="Inventory.DoToSelected" userdata="cut" />
172 </menu_item_call>
173 <menu_item_call bottom_delta="-18" height="18" label="Copy" left="0" mouse_opaque="true"
170 name="Copy" width="128"> 174 name="Copy" width="128">
171 <on_click filter="" function="Inventory.DoToSelected" userdata="copy" /> 175 <on_click filter="" function="Inventory.DoToSelected" userdata="copy" />
172 </menu_item_call> 176 </menu_item_call>
173 <menu_item_call bottom_delta="-18" height="18" label="Paste" left="0" mouse_opaque="true" 177 <menu_item_call bottom_delta="-18" height="18" label="Paste" left="0" mouse_opaque="true"
174 name="Paste" width="128"> 178 name="Paste" width="128">
175 <on_click filter="" function="Inventory.DoToSelected" userdata="paste" /> 179 <on_click filter="" function="Inventory.DoToSelected" userdata="paste" />
176 </menu_item_call> 180 </menu_item_call>
diff --git a/linden/indra/newview/wlsettingsmanager.cpp b/linden/indra/newview/wlsettingsmanager.cpp
index 78516df..ea37f61 100644
--- a/linden/indra/newview/wlsettingsmanager.cpp
+++ b/linden/indra/newview/wlsettingsmanager.cpp
@@ -178,7 +178,7 @@ void WLSettingsManager::Apply()
178 fade = mSky->getFloat("fade", error); 178 fade = mSky->getFloat("fade", error);
179 179
180 mWater->mName = wlWaterPresetName; 180 mWater->mName = wlWaterPresetName;
181 if(fade != 0) 181 if(fade != 0 && water_mgr->mCurParams.mName == wlWaterPresetName)//Load the settings forcefully the first time
182 { 182 {
183 LLWaterParamSet oldWset = water_mgr->mCurParams; 183 LLWaterParamSet oldWset = water_mgr->mCurParams;
184 //This still needs done so that we update right, but load it to the old 184 //This still needs done so that we update right, but load it to the old
@@ -201,7 +201,7 @@ void WLSettingsManager::Apply()
201 } 201 }
202 202
203 mSky->mName = wlSkyPresetName; 203 mSky->mName = wlSkyPresetName;
204 if(fade != 0) 204 if(fade != 0 && sky_mgr->mCurParams.mName == wlSkyPresetName)//Load the settings forcefully the first time
205 { 205 {
206 LLWLParamSet oldset = sky_mgr->mCurParams; 206 LLWLParamSet oldset = sky_mgr->mCurParams;
207 //This still needs done so that we update right, but load it to the old 207 //This still needs done so that we update right, but load it to the old