Disable cursor while hovering over MapView. Remove unnecessary connection.
This commit is contained in:
@@ -1342,6 +1342,7 @@ MapView::MapView( math::degrees camera_yaw0
|
||||
, _modeStampTool{&_showStampPalette, &_cursorRotation, this}
|
||||
, _modeStampPaletteMain{this}
|
||||
{
|
||||
setCursor(Qt::BlankCursor);
|
||||
_main_window->setCorner(Qt::TopLeftCorner, Qt::LeftDockWidgetArea);
|
||||
_main_window->setCorner(Qt::BottomLeftCorner, Qt::LeftDockWidgetArea);
|
||||
_main_window->setCorner(Qt::TopRightCorner, Qt::RightDockWidgetArea);
|
||||
|
||||
@@ -26,8 +26,12 @@ PaletteMain::PaletteMain(MapView* parent)
|
||||
_view.setIconSize({128, 128});
|
||||
_view.setWrapping(true);
|
||||
_view.setModel(&_model);
|
||||
connect(&_view, &QAbstractItemView::clicked, [this](QModelIndex const& index) -> void { emit itemSelected(index.data(Qt::UserRole).value<QPixmap const*>()); });
|
||||
connect(this, &PaletteMain::itemSelected, [parent](QPixmap const* pixmap) -> void { parent->setBrushTexture(pixmap); });
|
||||
connect(&_view, &QAbstractItemView::clicked, [this, parent](QModelIndex const& index) -> void
|
||||
{
|
||||
QPixmap const* pixmap{index.data(Qt::UserRole).value<QPixmap const*>()};
|
||||
parent->setBrushTexture(pixmap);
|
||||
emit itemSelected(pixmap);
|
||||
});
|
||||
_layout.addWidget(&_view);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user