From 3efe64619b772ce8cab596d7e74de48dcc7f6c20 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 2 Jun 2022 00:17:54 +0300 Subject: SL-15312 Confirm usaved changes dialog when closing floater --- indra/newview/llpanelprofilepicks.h | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) (limited to 'indra/newview/llpanelprofilepicks.h') diff --git a/indra/newview/llpanelprofilepicks.h b/indra/newview/llpanelprofilepicks.h index e1c424ca24..d5df7b7f12 100644 --- a/indra/newview/llpanelprofilepicks.h +++ b/indra/newview/llpanelprofilepicks.h @@ -50,17 +50,17 @@ public: LLPanelProfilePicks(); /*virtual*/ ~LLPanelProfilePicks(); - /*virtual*/ BOOL postBuild(); + BOOL postBuild() override; - /*virtual*/ void onOpen(const LLSD& key); + void onOpen(const LLSD& key) override; void createPick(const LLPickData &data); void selectPick(const LLUUID& pick_id); - /*virtual*/ void processProperties(void* data, EAvatarProcessorType type); + void processProperties(void* data, EAvatarProcessorType type) override; void processProperties(const LLAvatarPicks* avatar_picks); - /*virtual*/ void resetData(); + void resetData() override; void updateButtons(); @@ -72,7 +72,10 @@ public: /** * Sends update data request to server. */ - /*virtual*/ void updateData(); + void updateData() override; + + bool hasUnsavedChanges() override; + void commitUnsavedChanges() override; friend void request_avatar_properties_coro(std::string cap_url, LLUUID agent_id); @@ -107,7 +110,7 @@ public: /*virtual*/ ~LLPanelProfilePick(); - /*virtual*/ BOOL postBuild(); + BOOL postBuild() override; void setAvatarId(const LLUUID& avatar_id); @@ -117,9 +120,14 @@ public: virtual void setPickName(const std::string& name); const std::string getPickName(); - /*virtual*/ void processProperties(void* data, EAvatarProcessorType type); + void processProperties(void* data, EAvatarProcessorType type) override; void processProperties(const LLPickData* pick_data); + /** + * Returns true if any of Pick properties was changed by user. + */ + BOOL isDirty() const override; + /** * Saves changes. */ @@ -128,9 +136,9 @@ public: void updateTabLabel(const std::string& title); //This stuff we got from LLRemoteParcelObserver, in the last one we intentionally do nothing - /*virtual*/ void processParcelInfo(const LLParcelData& parcel_data); - /*virtual*/ void setParcelID(const LLUUID& parcel_id) { mParcelId = parcel_id; } - /*virtual*/ void setErrorStatus(S32 status, const std::string& reason) {}; + void processParcelInfo(const LLParcelData& parcel_data) override; + void setParcelID(const LLUUID& parcel_id) override { mParcelId = parcel_id; } + void setErrorStatus(S32 status, const std::string& reason) override {}; protected: @@ -191,12 +199,7 @@ protected: /** * Resets panel and all cantrols to unedited state */ - /*virtual*/ void resetDirty(); - - /** - * Returns true if any of Pick properties was changed by user. - */ - /*virtual*/ BOOL isDirty() const; + void resetDirty() override; /** * Callback for "Set Location" button click -- cgit v1.2.3