move swatch reset to Menu

This commit is contained in:
Stephen Birarda 2013-08-15 15:52:47 -07:00
parent 0ec2b761e9
commit 4a13f3b75a
4 changed files with 7 additions and 7 deletions

View file

@ -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;

View file

@ -135,7 +135,6 @@ public:
public slots:
void sendAvatarFaceVideoMessage(int frameCount, const QByteArray& data);
void resetSwatchColors();
void exportVoxels();
void importVoxels();
void importVoxelsToClipboard();

View file

@ -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) {

View file

@ -67,6 +67,7 @@ private slots:
void updateVoxelModeActions();
void chooseVoxelPaintColor();
void runTests();
void resetSwatchColors();
private:
static Menu* _instance;