@@ -865,13 +865,17 @@ void QgisApp::createStatusBar()
865
865
statusBar ()->setFont (myFont);
866
866
mScaleLabel = new QLabel (QString (" Scale" ),statusBar ());
867
867
mScaleLabel ->setFont (myFont);
868
- mScaleLabel ->setMinimumWidth (100 );
868
+ mScaleLabel ->setMinimumWidth (10 );
869
+ mScaleLabel ->setMargin (3 );
870
+ mScaleLabel ->setAlignment (Qt::AlignCenter);
869
871
QWhatsThis::add (mScaleLabel , tr (" Displays the current map scale" ));
870
872
statusBar ()->addWidget (mScaleLabel , 0 ,true );
871
873
// coords status bar widget
872
874
mCoordsLabel = new QLabel (QString (" Coordinates:" ), statusBar ());
873
- mCoordsLabel ->setMinimumWidth (200 );
875
+ mCoordsLabel ->setMinimumWidth (10 );
874
876
mCoordsLabel ->setFont (myFont);
877
+ mCoordsLabel ->setMargin (3 );
878
+ mCoordsLabel ->setAlignment (Qt::AlignCenter);
875
879
QWhatsThis::add (mCoordsLabel , tr (" Shows the map coordinates at the current cursor postion. The display is continuously updated as the mouse is moved." ));
876
880
statusBar ()->addWidget (mCoordsLabel , 0 , true );
877
881
// render suppression status bar widget
@@ -1108,7 +1112,7 @@ void QgisApp::createCanvas()
1108
1112
int myBlue = mySettings.value (" /qgis/default_canvas_color_blue" ,255 ).toInt ();
1109
1113
mMapCanvas ->setCanvasColor (QColor (myRed,myGreen,myBlue)); // this is the fill co;our when rendering
1110
1114
1111
- mMapCanvas ->setMinimumWidth (400 );
1115
+ mMapCanvas ->setMinimumWidth (10 );
1112
1116
QVBoxLayout *myCanvasLayout = new QVBoxLayout;
1113
1117
myCanvasLayout->addWidget (mMapCanvas );
1114
1118
tabWidget->widget (0 )->setLayout (myCanvasLayout);
@@ -3413,18 +3417,24 @@ void QgisApp::measureArea()
3413
3417
}
3414
3418
3415
3419
3420
+
3416
3421
void QgisApp::attributeTable ()
3417
3422
{
3423
+ std::cerr << " >> = " << std::endl;
3418
3424
QgsMapLayer *layer = mMapLegend ->currentLayer ();
3425
+ std::cerr << " >> = " << std::endl;
3419
3426
if (layer)
3420
3427
{
3428
+ std::cerr << " >>> = " << std::endl;
3421
3429
layer->table ();
3430
+ std::cerr << " >>> = " << std::endl;
3422
3431
}
3423
3432
else
3424
3433
{
3425
3434
QMessageBox::information (this , tr (" No Layer Selected" ),
3426
3435
tr (" To open an attribute table, you must select a layer in the legend" ));
3427
3436
}
3437
+ std::cerr << " >> = " << std::endl;
3428
3438
}
3429
3439
3430
3440
void QgisApp::deleteSelected ()
@@ -3608,11 +3618,21 @@ void QgisApp::refreshMapCanvas()
3608
3618
void QgisApp::showMouseCoordinate (QgsPoint & p)
3609
3619
{
3610
3620
mCoordsLabel ->setText (p.stringRep (mMousePrecisionDecimalPlaces ));
3621
+ // Set minimum necessary width
3622
+ if ( mCoordsLabel ->width () > mCoordsLabel ->minimumWidth () )
3623
+ {
3624
+ mCoordsLabel ->setMinimumWidth (mCoordsLabel ->width ());
3625
+ }
3611
3626
}
3612
3627
3613
3628
void QgisApp::showScale (QString theScale)
3614
3629
{
3615
3630
mScaleLabel ->setText (theScale);
3631
+ // Set minimum necessary width
3632
+ if ( mScaleLabel ->width () > mScaleLabel ->minimumWidth () )
3633
+ {
3634
+ mScaleLabel ->setMinimumWidth (mScaleLabel ->width ());
3635
+ }
3616
3636
}
3617
3637
3618
3638
void QgisApp::testButton ()
0 commit comments