# HG changeset patch # User Santeri Piippo # Date 1373156060 -10800 # Node ID 07b3753baedc43e8a72c90614f2fc34544f23a35 # Parent e8184f4e28f3e16c042903ec7d5990abd9fd0dcc dded an action to quickly toggle BFC red/green view. diff -r e8184f4e28f3 -r 07b3753baedc changelog.txt --- a/changelog.txt Sun Jul 07 03:04:40 2013 +0300 +++ b/changelog.txt Sun Jul 07 03:14:20 2013 +0300 @@ -15,6 +15,7 @@ - Replace coords: allow replacing all coords regardless of original value, plus relative moving (offset) - Objects can now be edited by double-clicking on them. - When drawing, drawn vertices now display coordinate labels. +- Added an action to quickly toggle BFC red/green view. - Changed default keys for Y-axis moving from PgUp/PgDown to Home and End ala MLCAD. - [Linux] External programs can now be launched with Wine. - Improved external program fault handling: don't try to replace/append the output in case of failure, catch non-zero exit codes. diff -r e8184f4e28f3 -r 07b3753baedc ldforge.qrc --- a/ldforge.qrc Sun Jul 07 03:04:40 2013 +0300 +++ b/ldforge.qrc Sun Jul 07 03:14:20 2013 +0300 @@ -17,6 +17,7 @@ ./icons/autocolor.png ./icons/axes.png ./icons/bfc.png + ./icons/bfc-view.png ./icons/bomb.png ./icons/brick-new.png ./icons/brick.png diff -r e8184f4e28f3 -r 07b3753baedc mkqrc.sh --- a/mkqrc.sh Sun Jul 07 03:04:40 2013 +0300 +++ b/mkqrc.sh Sun Jul 07 03:14:20 2013 +0300 @@ -7,18 +7,6 @@ printf "\n\n\n" >> $QRCFILE -# Make sure that whatever goes to QRC is added to the repo. -# I keep forgetting to do this myself. -for line in $(hg status $FILES |grep "?"); do - if [ "$line" != "?" ]; then - echo "hg add $line" - hg add $line; - - echo "pngout $line" - pngout $line - fi -done - for f in $FILES; do printf "\t$f\n" >> $QRCFILE done diff -r e8184f4e28f3 -r 07b3753baedc src/gui.cpp --- a/src/gui.cpp Sun Jul 07 03:04:40 2013 +0300 +++ b/src/gui.cpp Sun Jul 07 03:14:20 2013 +0300 @@ -61,6 +61,7 @@ extern_cfg (str, gl_maincolor); extern_cfg (float, gl_maincolor_alpha); extern_cfg (bool, gl_wireframe); +extern_cfg (bool, gl_colorbfc); const char* g_modeActionNames[] = { "modeSelect", @@ -148,6 +149,9 @@ findAction ("wireframe")->setCheckable (true); findAction ("wireframe")->setChecked (gl_wireframe); + findAction ("colorbfc")->setCheckable (true); + findAction ("colorbfc")->setChecked (gl_colorbfc); + updateEditModeActions (); // things not implemented yet @@ -202,6 +206,7 @@ addMenuAction ("resetView"); addMenuAction ("axes"); addMenuAction ("wireframe"); + addMenuAction ("colorbfc"); menu->addSeparator (); addMenuAction ("setOverlay"); addMenuAction ("clearOverlay"); @@ -406,6 +411,7 @@ initSingleToolBar ("View"); addToolBarAction ("axes"); addToolBarAction ("wireframe"); + addToolBarAction ("colorbfc"); // ========================================== // Color toolbar diff -r e8184f4e28f3 -r 07b3753baedc src/gui_actions.cpp --- a/src/gui_actions.cpp Sun Jul 07 03:04:40 2013 +0300 +++ b/src/gui_actions.cpp Sun Jul 07 03:14:20 2013 +0300 @@ -38,6 +38,7 @@ #include "widgets.h" extern_cfg (bool, gl_wireframe); +extern_cfg( bool, gl_colorbfc ); // ============================================================================= // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -506,4 +507,11 @@ MAKE_ACTION (reloadPrimitives, "Scan Primitives", "", "", (0)) { PrimitiveLister::start (); +} + +MAKE_ACTION( colorbfc, "BFC Red/Green View", "bfc-view", "", SHIFT( B )) +{ + gl_colorbfc = !gl_colorbfc; + ACTION( colorbfc )->setChecked( gl_colorbfc ); + g_win->R ()->refresh(); } \ No newline at end of file