Commit 36f68360 authored by Jan Möbius's avatar Jan Möbius

Second try to fix cursor problems

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@8210 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 810265fe
......@@ -93,19 +93,19 @@ void CoreWidget::setActionMode(const Viewer::ActionMode _am){
switch ( _am )
{
case Viewer::ExamineMode:
cursorPainter_->setCursor(QCursor( QPixmap( OpenFlipper::Options::iconDirStr() + QDir::separator() + "cursor_move.png" )));
cursorPainter_->setCursor(QCursor( QPixmap( OpenFlipper::Options::iconDirStr() + QDir::separator() + "cursor_move.png" ) ,0,0 ));
break;
case Viewer::LightMode:
cursorPainter_->setCursor(QCursor( QPixmap( OpenFlipper::Options::iconDirStr() + QDir::separator() + "cursor_light.png" )));
cursorPainter_->setCursor(QCursor( QPixmap( OpenFlipper::Options::iconDirStr() + QDir::separator() + "cursor_light.png" ) ,0,0 ));
break;
case Viewer::PickingMode:
cursorPainter_->setCursor(QCursor( QPixmap( OpenFlipper::Options::iconDirStr() + QDir::separator() + "cursor_arrow.png" )));
cursorPainter_->setCursor(QCursor( QPixmap( OpenFlipper::Options::iconDirStr() + QDir::separator() + "cursor_arrow.png" ) ,0,0 ));
if (pick_mode_idx_ != -1) {
cursorPainter_->setCursor(pick_modes_[pick_mode_idx_].cursor);
}
break;
case Viewer::QuestionMode:
cursorPainter_->setCursor(QCursor( QPixmap( OpenFlipper::Options::iconDirStr() + QDir::separator() + "cursor_whatsthis.png" )));
cursorPainter_->setCursor(QCursor( QPixmap( OpenFlipper::Options::iconDirStr() + QDir::separator() + "cursor_whatsthis.png" ) ,0,0 ));
break;
}
......
......@@ -263,6 +263,7 @@ void CursorPainter::cursorToTexture()
// Get the image of the cursor
cImg = QImage(( nativeCursor_.pixmap().toImage() ) );
// get the hotspot from the cursor
xOff_ = nativeCursor_.hotSpot().x();
yOff_ = nativeCursor_.hotSpot().y();
......@@ -271,7 +272,7 @@ void CursorPainter::cursorToTexture()
std::cerr << "cursorToTexture: Unknown cursor shape!" << nativeCursor_.shape() << std::endl;
return;
}
// Check if the cursor dimension is matching our requirements
if (cImg.width () != 32 || cImg.height () != 32) {
std::cerr << "cursorToTexture: Dimension error" << nativeCursor_.shape() << std::endl;
......@@ -354,7 +355,7 @@ void CursorPainter::cursorToCursor()
pix.load (OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"cursor_move.png");
if (!pix.isNull() && pix.width() == 32 && pix.height() == 32)
{
cursor_ = QCursor (pix, 7, 1);
cursor_ = QCursor (pix, 0, 0);
}
else
cursor_ = nativeCursor_;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment