[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdeedu/marble/src/plugins/render/positionmarker
From: Torsten Rahn <tackat () kde ! org>
Date: 2011-01-06 16:22:30
Message-ID: 20110106162230.AF496AC8B0 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1212352 by rahn:
Changes:
Fix crash in position marker plugin on startup
http://reviewboard.kde.org/r/6293/
by Daniel Marth
M +11 -2 PositionMarker.cpp
--- trunk/KDE/kdeedu/marble/src/plugins/render/positionmarker/PositionMarker.cpp \
#1212351:1212352 @@ -303,8 +303,9 @@
void PositionMarker::readSettings() const
{
- if ( !m_configDialog )
+ if ( !m_configDialog ) {
return;
+ }
if( m_settings.value( "useCustomCursor" ).toBool() )
ui_configWidget->m_customCursor->click();
@@ -335,6 +336,10 @@
void PositionMarker::writeSettings()
{
+ if ( !m_configDialog ) {
+ return;
+ }
+
m_settings.insert( "useCustomCursor", \
ui_configWidget->m_customCursor->isChecked() ); m_settings.insert( "cursorPath", \
m_cursorPath );
m_settings.insert( "cursorSize", \
sm_resizeSteps[ui_configWidget->m_resizeSlider->value()] ); @@ -374,16 +379,20 @@
m_customCursor = QPixmap( filename ).scaled( 22 * m_cursorSize, 22 * \
m_cursorSize, Qt::KeepAspectRatio, Qt::SmoothTransformation ); if( \
!m_customCursor.isNull() ) {
+ if( m_configDialog )
+ {
if( useCursor )
ui_configWidget->m_customCursor->click();
ui_configWidget->m_fileChooserButton->setIconSize( QSize( \
m_customCursor.width(), m_customCursor.height() ) );
ui_configWidget->m_fileChooserButton->setIcon( QIcon( m_customCursor ) );
+ }
m_cursorPath = filename;
}
else
{
QMessageBox::warning( NULL, tr( "Position Marker Plugin" ), tr( "Unable to \
load custom cursor, default cursor will be used. "
"Make sure this is a valid \
image file." ), QMessageBox::Ok ); + if ( m_configDialog )
ui_configWidget->m_fileChooserButton->setIcon( QIcon( m_defaultCursor ) );
m_customCursor = m_defaultCursor;
m_cursorPath = m_defaultCursorPath;
@@ -398,7 +407,7 @@
void PositionMarker::chooseAccuracyCircleColor()
{
QColor c = QColorDialog::getColor( m_acColor, 0,
- "Please choose the color for the accuracy circle",
+ tr( "Please choose the color for the accuracy \
circle" ), QColorDialog::ShowAlphaChannel );
if( c.isValid() )
{
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic