Skip to content
Permalink
Browse files

How did GIS look like in 1990?

Apologies to fellow developers for being silly
  • Loading branch information
wonder-sk committed Sep 26, 2014
1 parent 27abd20 commit 34b33fa168454d367f93f36ea0f5a90e47e94568
Showing with 11 additions and 0 deletions.
  1. +5 −0 src/app/qgisapp.cpp
  2. +6 −0 src/gui/qgsmapcanvasmap.cpp
@@ -6749,6 +6749,11 @@ void QgisApp::userCenter()
else
mDizzyTimer->start( 100 );
}
else if ( mCoordsEdit->text() == "retro" )
{
mMapCanvas->setProperty( "retro", !mMapCanvas->property( "retro" ).toBool() );
refreshMapCanvas();
}

QStringList parts = mCoordsEdit->text().split( ',' );
if ( parts.size() != 2 )
@@ -35,6 +35,12 @@ QgsMapCanvasMap::~QgsMapCanvasMap()
void QgsMapCanvasMap::setContent( const QImage& image, const QgsRectangle& rect )
{
mImage = image;

// For true retro fans: this is approximately how the graphics looked like in 1990
if ( mMapCanvas->property( "retro" ).toBool() )
mImage = mImage.scaled( mImage.width() / 3, mImage.height() / 3 )
.convertToFormat( QImage::Format_Indexed8, Qt::OrderedDither | Qt::OrderedAlphaDither );

setRect( rect );
}

2 comments on commit 34b33fa

@nyalldawson

This comment has been minimized.

Copy link
Collaborator

@nyalldawson nyalldawson replied Sep 26, 2014

@wonder-sk shouldn't a change this important come with unit tests?

@wonder-sk

This comment has been minimized.

Copy link
Member Author

@wonder-sk wonder-sk replied Sep 26, 2014

@nyalldawson MC Hammer says it is better not to touch the code again rather than writing unit tests for it:
http://www.youtube.com/watch?v=otCpCn0l4Wo

Please sign in to comment.
You can’t perform that action at this time.