From 4a13f3b75a6719fd258dbb9a3d53a09edce74d61 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 15 Aug 2013 15:52:47 -0700 Subject: [PATCH] move swatch reset to Menu --- interface/src/Application.cpp | 4 ---- interface/src/Application.h | 1 - interface/src/Menu.cpp | 8 ++++++-- interface/src/Menu.h | 1 + 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 1674fcd312..9d59894aff 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -1128,10 +1128,6 @@ void Application::increaseVoxelSize() { _mouseVoxelScale *= 2; } -void Application::resetSwatchColors() { - _swatch.reset(); -} - const int MAXIMUM_EDIT_VOXEL_MESSAGE_SIZE = 1500; struct SendVoxelsOperationArgs { unsigned char* newBaseOctCode; diff --git a/interface/src/Application.h b/interface/src/Application.h index 88551f1b16..32fa39eb83 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -135,7 +135,6 @@ public: public slots: void sendAvatarFaceVideoMessage(int frameCount, const QByteArray& data); - void resetSwatchColors(); void exportVoxels(); void importVoxels(); void importVoxelsToClipboard(); diff --git a/interface/src/Menu.cpp b/interface/src/Menu.cpp index 4c450e3cb0..d7390ee9a3 100644 --- a/interface/src/Menu.cpp +++ b/interface/src/Menu.cpp @@ -227,7 +227,7 @@ Menu::Menu() : QKeySequence::ZoomIn, appInstance, SLOT(increaseVoxelSize())); - addActionToQMenuAndActionHash(voxelMenu, MenuOption::ResetSwatchColors, 0, appInstance, SLOT(resetSwatchColors())); + addActionToQMenuAndActionHash(voxelMenu, MenuOption::ResetSwatchColors, 0, this, SLOT(resetSwatchColors())); addCheckableActionToQMenuAndActionHash(voxelMenu, MenuOption::DestructiveAddVoxel); @@ -743,12 +743,16 @@ void Menu::chooseVoxelPaintColor() { // restore the main window's active state appInstance->getWindow()->activateWindow(); -} +}g void Menu::runTests() { runTimingTests(); } +void Menu::resetSwatchColors() { + Application::getInstance()->getSwatch()->reset(); +} + void Menu::updateFrustumRenderModeAction() { QAction* frustumRenderModeAction = _actionHash.value(MenuOption::FrustumRenderMode); switch (_frustumDrawMode) { diff --git a/interface/src/Menu.h b/interface/src/Menu.h index f025cc96cc..544a6c0faf 100644 --- a/interface/src/Menu.h +++ b/interface/src/Menu.h @@ -67,6 +67,7 @@ private slots: void updateVoxelModeActions(); void chooseVoxelPaintColor(); void runTests(); + void resetSwatchColors(); private: static Menu* _instance;